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.CaiWu.CaiWuTongJiFenXi
{
    public partial class W_XJYINHLSZ
    {
        public W_XJYINHLSZ()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            string curYhbh = A8ERP.AppService.GetUserID();
            this.SetParm("curYhbh", curYhbh);

            string curCdbh = this.FunctionID;
            string curZhbh = string.Empty;
            string curBeginDate = string.Empty;
            string curEndDate = string.Empty;
            this.SetParm("curCdbh", curCdbh);

            //dw_list.ClickHeaderSort = true;


            #region 调用保存格式
            string FormatPzhAndValue = AppService.GetYwFormatBH(AppService.GetUserID(), this.FunctionID);
            if (FormatPzhAndValue != null && FormatPzhAndValue != "")
            {
                this.SetParm("format_pzh", FormatPzhAndValue.Split('&')[0].ToString());
                AppService.GetYwFormat(dw_list, FormatPzhAndValue.Split('&')[1].ToString());
            }
            #endregion

            #region 外来凭证打开
            if (Request["curFormPzh"] != null)
            {
                curZhbh = Request["curFormPzh"].ToString();
            }
            if (Request["curEndDate"] != null)
            {
                curEndDate = Request["curEndDate"].ToString();
            }
            if (Request["curBeginDate"] != null)
            {
                curBeginDate = Request["curBeginDate"].ToString();
            }
            this.SetParm("curFormPzh", curZhbh);
            this.SetParm("curBeginDate", curBeginDate);
            this.SetParm("curEndDate", curEndDate);
            #endregion 

           // A8ERP.Common.DWServiceHelp.AddReportService(dw_list);
            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryBase", "/DangAn/Base/OpenWindowQueryBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_YW_LIST", "/CaiWu/JinHuoFuKuanDan/W_YW_LIST.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_Single_List_", "/CaiWu/JinHuoFuKuanDan/W_Single_List_.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowSimpleChoseBase", "/DangAn/Base/OpenWindowSimpleChoseBase.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_XJYINHLSZ", "/CaiWu/CaiWuTongJiFenXi/W_XJYINHLSZ.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("W_XJYINHLSZ_FROM_RJMX", "/CaiWu/CaiWuTongJiFenXi/W_XJYINHLSZ_FROM_RJMX.win.js?JSV=" + AppService.GetJSVesion());

            }

            this.IsRegisterScriptFile = false;
        }
    }
}
