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.Mxjsyj
{
    public partial class W_Mxjsyj_Edit
    {
        public W_Mxjsyj_Edit()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            dw_bm.DataStore.DataWindowObject = "dw_cxfa_mxjsjy_bm";
            dw_top.DataStore.DataWindowObject = "dw_cxfa_mxjsyj_top";
            this.Title = "买X件送Y件";
            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 = "cxsp";
            DataWindow dw_cxsp = new TXSoft.ExtPB.DataWindow();
            tab_1.Controls.Add(tp1);
            dw_cxsp.Dock = System.Windows.Forms.DockStyle.Fill;
            dw_cxsp.BorderStyle = TXSoft.ExtPB.BorderStyle.None;
            dw_cxsp.SetProperty("GenerateMember", "True");
            dw_cxsp.Height = 189;
            dw_cxsp.Width = 645;
            dw_cxsp.HScrollBar = false;
            dw_cxsp.HSplitScroll = false;
            dw_cxsp.Name = "dw_cxsp";
            dw_cxsp.Visible = true;
            dw_cxsp.VScrollBar = false;
            tp1.Visible = true;
            dw_cxsp.DataWindowObject = "dw_cxfa_mxjsyj_cxsp_list";
            dw_cxsp.ObjectBorderColor = System.Drawing.Color.SkyBlue;
            dw_cxsp.ShowPageRowCountInfo = false;
            dw_cxsp.ShowPagingButonText = false;
            dw_cxsp.ShowRetrieveMessage = false;
            dw_cxsp.X = 3;
            dw_cxsp.Y = 3;
            tp1.Controls.Add(dw_cxsp);
            dw_cxsp.HScrollBar = false;
            dw_cxsp.VScrollBar = true;
            //赠送商品
            TabPage tp2 = new TXSoft.ExtPB.TabPage();
            tp2.Dock = System.Windows.Forms.DockStyle.Fill;
            tp2.Text = "赠送商品";
            tp2.TabIndex = 2;
            tp2.Name = "zssp";
            DataWindow dw_zssp = new TXSoft.ExtPB.DataWindow();
            tab_1.Controls.Add(tp2);
            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;
            tp2.Visible = true;
            dw_zssp.DataWindowObject = "dw_cxfa_mxjsyj_zssp_list";
            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;
            tp2.Controls.Add(dw_zssp);
            dw_zssp.HScrollBar = false;
            dw_zssp.VScrollBar = true;
            //方案级别
            TabPage tp3 = new TXSoft.ExtPB.TabPage();
            tp3.Dock = System.Windows.Forms.DockStyle.Fill;
            tp3.Text = "方案级别";
            tp3.TabIndex = 2;
            tp3.Name = "fajb";
            DataWindow dw_fajb = new TXSoft.ExtPB.DataWindow();
            tab_1.Controls.Add(tp3);
            dw_fajb.Dock = System.Windows.Forms.DockStyle.Fill;
            dw_fajb.BorderStyle = TXSoft.ExtPB.BorderStyle.None;
            dw_fajb.SetProperty("GenerateMember", "True");
            dw_fajb.Height = 189;
            dw_fajb.Width = 645;
            dw_fajb.HScrollBar = false;
            dw_fajb.HSplitScroll = false;
            dw_fajb.Name = "dw_fajb";
            dw_fajb.Visible = true;
            dw_fajb.VScrollBar = false;
            tp3.Visible = true;
            dw_fajb.DataWindowObject = "dw_cxfa_mxjsjy_fajb_list";
            dw_fajb.ObjectBorderColor = System.Drawing.Color.SkyBlue;
            dw_fajb.ShowPageRowCountInfo = false;
            dw_fajb.ShowPagingButonText = false;
            dw_fajb.ShowRetrieveMessage = false;
            dw_fajb.X = 3;
            dw_fajb.Y = 3;
            tp3.Controls.Add(dw_fajb);
            dw_fajb.HScrollBar = false;
            dw_fajb.VScrollBar = true;
            A8ERP.Common.DWServiceHelp.AddReportService(dw_zssp);
            A8ERP.Common.DWServiceHelp.AddReportService(dw_cxsp);
            A8ERP.Common.DWServiceHelp.AddReportService(dw_fajb);
            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("W_CXFSSPDR", "/import/W_CXFSSPDR.win.js");
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryBase", "/DangAn/Base/OpenWindowQueryBase.win.js");
                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;

            }
        }
    }
}
