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.Mxjdyz
{
    public partial class W_Mxjdyz_Edit
    {
        public W_Mxjdyz_Edit()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            dw_bm.DataStore.DataWindowObject = "dw_cxfa_mxjdyz_bm";
            dw_top.DataStore.DataWindowObject = "dw_cxfa_mxjdyz_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_mxjdyz_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 = "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_mxjdyz_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_cxsp);
           
            if ("EDIT".Equals(opFlag))
            {

                cb_import.Enabled = false;
            }
            if ("ADD".Equals(opFlag))
            {
                cb_import.Enabled = true;

            }
            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());
            }

            this.IsRegisterScriptFile = false;

        }
    }
}
