using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;

using Sybase.DataWindow;
using TXSoft.Common;
using TXSoft.ExtPB;
using TXSoft.DataStore;


namespace A8ERP.CuXiao.Mmxystdsp
{
    public partial class W_Mmxystdsp_Edit
    {
        public W_Mmxystdsp_Edit()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            dw_bm.DataStore.DataWindowObject = "dw_cxfa_mmxystdsp_bm";
            dw_top.DataStore.DataWindowObject = "dw_cxfa_mmxystdsp_top";
            this.Title = "买满X元送某一特定商品";
            A8ERP.Common.DWServiceHelp.AddReportService(dw_bm);
            string opFlag = Request["opFlag"].ToString();
            this.SetParm("opFlag", opFlag);
            //赠送商品
            TabPage tp1 = new TXSoft.ExtPB.TabPage();
            tp1.Dock = System.Windows.Forms.DockStyle.Fill;
            tp1.Text = "赠送商品";
            tp1.TabIndex = 1;
            tp1.Name = "zssp";
            DataWindow dw_zssp = new TXSoft.ExtPB.DataWindow();
            tab_1.Controls.Add(tp1);
            dw_zssp.Dock = System.Windows.Forms.DockStyle.Fill;
            dw_zssp.BorderStyle = TXSoft.ExtPB.BorderStyle.None;
            dw_zssp.SetProperty("GenerateMember", "True");
            dw_zssp.Height = 189;
            dw_zssp.Width = 645;
            dw_zssp.HScrollBar = false;
            dw_zssp.HSplitScroll = false;
            dw_zssp.Name = "dw_zssp";
            dw_zssp.Visible = true;
            dw_zssp.VScrollBar = false;
            tp1.Visible = true;
            dw_zssp.DataWindowObject = "dw_cxfa_mmxystdsp_zssp";
            dw_zssp.ObjectBorderColor = System.Drawing.Color.SkyBlue;
            dw_zssp.ShowPageRowCountInfo = false;
            dw_zssp.ShowPagingButonText = false;
            dw_zssp.ShowRetrieveMessage = false;
            dw_zssp.X = 3;
            dw_zssp.Y = 3;
            tp1.Controls.Add(dw_zssp);
            dw_zssp.HScrollBar = false;
            dw_zssp.VScrollBar = true;
            ////打折明细
            //TabPage tp2 = new TXSoft.ExtPB.TabPage();
            //tp2.Dock = System.Windows.Forms.DockStyle.Fill;
            //tp2.Text = "打折明细";
            //tp2.TabIndex = 2;
            //tp2.Name = "dzmx";
            //DataWindow dw_dzmx = new TXSoft.ExtPB.DataWindow();
            //tab_1.Controls.Add(tp2);
            //dw_dzmx.Dock = System.Windows.Forms.DockStyle.Fill;
            //dw_dzmx.BorderStyle = TXSoft.ExtPB.BorderStyle.None;
            //dw_dzmx.SetProperty("GenerateMember", "True");
            //dw_dzmx.Height = 189;
            //dw_dzmx.Width = 645;
            //dw_dzmx.HScrollBar = false;
            //dw_dzmx.HSplitScroll = false;
            //dw_dzmx.Name = "dw_dzmx";
            //dw_dzmx.Visible = true;
            //dw_dzmx.VScrollBar = false;
            //tp2.Visible = true;
            //dw_dzmx.DataWindowObject = "dw_cxfa_mmxydyz_dzmx_list";
            //dw_dzmx.ObjectBorderColor = System.Drawing.Color.SkyBlue;
            //dw_dzmx.ShowPageRowCountInfo = false;
            //dw_dzmx.ShowPagingButonText = false;
            //dw_dzmx.ShowRetrieveMessage = false;
            //dw_dzmx.X = 3;
            //dw_dzmx.Y = 3;
            //tp2.Controls.Add(dw_dzmx);
            //dw_dzmx.HScrollBar = true;
            //dw_dzmx.VScrollBar = true;
            //A8ERP.Common.DWServiceHelp.AddReportService(dw_dzmx);
            A8ERP.Common.DWServiceHelp.AddReportService(dw_zssp);
            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("W_CXFSSPDR", "/import/W_CXFSSPDR.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryBase", "/DangAn/Base/OpenWindowQueryBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryNewBase", "/DangAn/Base/OpenWindowQueryNewBase.win.js?a=" + new DateTime());
            }
            if ("EDIT".Equals(opFlag))
            {
                cb_import.Enabled = false;
            }
            if ("ADD".Equals(opFlag))
            {
                cb_import.Enabled = true;

            }

            this.IsRegisterScriptFile = false;
        }
    }
}
