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.XianJinPinZheng
{
    public partial class W_XJYinHangPZ_Edit
    {
        public W_XJYinHangPZ_Edit()
        {

        }
        public override void OnLoad()
        {
            base.OnLoad();
            string CurUserId = A8ERP.AppService.GetUserID();

            this.SetParm("CurUserId", CurUserId);

            string EditModel = Request["curParm1"].ToString().Trim();
            this.SetParm("EditModel", EditModel);
            string djzt = Request["curParm2"].ToString().Trim();
            this.SetParm("djzt", djzt);

            if ("EDIT".Equals(EditModel))
            {
                string CurDqzt = Request["CurDqzt"].ToString().Trim();
                string CurPzh = Request["curParm2"].ToString().Trim();
                dw_1.Retrieve(CurPzh);
                if (CurDqzt!="F")
                {
                    dw_1.Enabled = false;
                    this.cb_Save.Enabled = false;
                }
                if (Request["CURGNQXSTR"] != null)
                {
                    if (Request["CURGNQXSTR"].ToString().IndexOf("btn_Edit") < 0)
                    {
                        this.cb_Save.Enabled = false;
                    }
                }
            }

            DataWindowChild dwc = dw_1.GetChild("bmbh");
            dwc.SetTransaction(this.AdoTransaction);
            dwc.Retrieve("%",CurUserId,"cw");

            dwc = dw_1.GetChild("rbmbh");
            dwc.SetTransaction(this.AdoTransaction);
            dwc.Retrieve("%", CurUserId, "cw");


            dwc = dw_1.GetChild("tzlx");
            dwc.SetTransaction(this.AdoTransaction);
            dwc.Retrieve("xjyh_tzlx");

            dwc = dw_1.GetChild("tzyhzh");
            dwc.SetTransaction(this.AdoTransaction);

            dwc = dw_1.GetChild("zryhzh");
            dwc.SetTransaction(this.AdoTransaction);

            if (this.Page != null)
            {
                this.Page.ClientScript.RegisterClientScriptInclude("W_XJYinHangPZ_Edit", "/CaiWu/XianJinPinZheng/W_XJYinHangPZ_Edit.win.js?JSV=" + AppService.GetJSVesion());
                this.Page.ClientScript.RegisterClientScriptInclude("OpenWindowQueryBase", "/DangAn/Base/OpenWindowQueryBase.win.js?JSV=" + AppService.GetJSVesion());
            }
            this.IsRegisterScriptFile = false;
        }
    }
}
