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_CW_KHYE_Main
    {
        public W_CW_KHYE_Main()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            string curYhbh = A8ERP.AppService.GetUserID();
            this.SetParm("curYhbh", curYhbh);
            this.SetParm("curCdbh", this.FunctionID);
      
            dw_temp.AllowCreate = true;
            dw_temp.AllowRetrieve = true;
            dw_format.AllowCreate = true;
            dw_format.AllowRetrieve = true;

            //DataTable dt = null;
            //DBHelp db = new DBHelp();

            //dt = db.QueryRDataTable(" select qybz from da_qj_csb where csfl='cw_jqdbm' and csbh='jqdbm' ");
            //if (dt.Rows[0]["qybz"].ToString() == "1")
            //{
            //    dw_temp.DataWindowObject = "dw_cw_khye_bmkh_list";
            //}
            //else
            //{
            //    dw_temp.DataWindowObject = "dw_cw_khye_kh_list";
            //}
            //this.SetParm("curJqdbm", dt.Rows[0]["qybz"].ToString());
            dw_list.ClickHeaderSort = true;
            this.st_title.Text = "客户余额统计分析";
            //ReportService service = (ReportService)dw_temp.Services.Add(ServiceName.Report);
            //A8ERP.Common.DWServiceHelp.AddReportService(dw_temp);
            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("W_YW_LIST", "/CaiWu/CaiWuTongJiFenXi/W_YW_LIST.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_CW_KHYE_Main", "/CaiWu/CaiWuTongJiFenXi/W_CW_KHYE_Main.win.js?JSV=" + AppService.GetJSVesion());
            }

            this.IsRegisterScriptFile = false;
        }
    }
}
