using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using A8ERP.Common;
using Sybase.DataWindow;
using TXSoft.Common;
using TXSoft.ExtPB;
using TXSoft.DataStore;
using A8erp.Cache;


namespace A8ERP.CaiGou.CaiGouDingDanTongJiFenXi
{
    public partial class W_ZXFX_TZD_CG 
    {
        private string cdbh = "";
        private string bbfl = "";
        private string bbmc = "";
        private string yhbh = "";
        private string pzh = "";
        public W_ZXFX_TZD_CG()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            dw_list_1.AllowCreate = true;
            dw_list_1.AllowRetrieve = true;
            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("W_Edit", "/DangAn/Base/OpenWindowDoubleRowsChooseBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryBase", "/DangAn/Base/OpenWindowQueryBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowSimpleChoseBase", "/DangAn/Base/OpenWindowSimpleChoseBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_Base_Report_Open_Mx", "/Base/W_Base_Report_Open_Mx.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_Base_Report_Open_Mx_Ex", "/Base/W_Base_Report_Open_Mx_Ex.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_Base_SaveOP", "/KuCun/TongJiFenXi/Base/W_Base_SaveOP.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_Base_BB_List", "/KuCun/TongJiFenXi/Base/W_Base_BB_List.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_KC_PIC", "/KuCun/TongJiFenXi/W_KC_PIC.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_NFCheck", "/KuCun/TongJiFenXi/W_NFCheck.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_ZXFX_TZD_CG", "/CaiGou/CaiGouDingDanTongJiFenXi/W_ZXFX_TZD_CG.win.js?JSV=" + AppService.GetJSVesion());   
              //  this.Page.ClientScript.RegisterClientScriptInclude("W_ZXFX_TZD_CG", "/CaiGou/CaiGouDingDanTongJiFenXi/W_MRQX_List.win.js?JSV=" + AppService.GetJSVesion());
            }       
            string curCol = A8ERP.Common.DWServiceHelp.GetCountColBYCSB();
            this.SetParm("curCol", curCol);
            DWServiceHelp.Add35CmCol(dw_zxsl_cg, false);
            DWServiceHelp.Add35CmColForZongXiangSanLan(dw_hssl, false); 
            dw_zxsl_cg.Visible = false;
            dw_hssl.Visible = false;
            string curYhbh = AppService.GetUserID();
            this.SetParm("curYhbh", curYhbh);
            this.SetParm("curYhmc", AppService.GetUserName());
            st_title.Text = "执行分析【采购通知单】";
            this.SetParm("curCdbh", this.FunctionID);
            dw_temp.AllowCreate = true;
            dw_temp.AllowRetrieve = true;
            dw_format.AllowCreate = true;
            dw_format.AllowRetrieve = true;

            string curJgtx = A8ERP.DBHelp.GetJGTXByBMAndYH(this.FunctionID, curYhbh);
            this.SetParm("jgtxlist", curJgtx);
            DataRow[] dt = CacheHelp.GetDataTable("REPORT_FORMAT").Select("cdbh ='" + this.FunctionID + "'  AND qdid ='" + curYhbh + "'");
            if (dt != null)
            {
                if (dt.Length > 0)
                {
                    pzh = dt[0][0].ToString();
                    bbmc = dt[0][1].ToString();
                    bbfl = dt[0][2].ToString();

                }
            }

            this.SetParm("pzh", pzh);
            this.SetParm("bbmc", bbmc);
            this.SetParm("bbfl", bbfl);
            this.IsRegisterScriptFile = false;
        }
    }
}
