///<reference path="/Scripts/ExtPB_Net.js" />
///<reference path="/Scripts/MyExtPB.js" />
///<reference path="/Scripts/ExtPB_Dll_Pb_Http.js" />
///<reference path="/Scripts/MyExtPb_Input.js" />

function W_Single_List_() {

	 var self=this;
	 this.Instance=null;
	 var requestor= new PBWindow();
	 var dw_1= new DataWindow( requestor );

	 if(typeof(this.bind)=="function") var baseBind=this.bind;
	 this.bind=function(win){
	 self.Instance=win;
	 if(typeof( baseBind )=="function") baseBind(win);

		 if(requestor == null ) requestor= new PBWindow();
		 requestor.Attach(win);
		 if(dw_1 == null ) dw_1= new DataWindow( requestor );
		 dw_1.Attach( win.Control( "dw_1") ); 

		 if(typeof(self.PostOpen)=="function") 
			 win.AttachEvent("window","PostOpen",self.PostOpen); 

	 }

	 if(typeof(this.unbind)=="function") var baseUnBind=this.unbind; 
	 this.unbind=function() {
	 self.Instance=null;
	 if(typeof(this.Release)=="function") this.Release(); 
	 if(typeof(baseUnBind)=="function") baseUnBind(); 

		 dw_1.Detach(); dw_1=null; 
		 requestor.Detach(); requestor=null; 

		 setTimeout(CollectGarbage, 100); 
	 }

	 //以上代码由设计器自动生成,请不要手工修改
	 //ExtPB.Net JavaScript End  设计器查找标志,请不要删除或修改
    var curFlag = "";
    this.PostOpen = function () {
        curFlag = requestor.GetParm("flag")
        var dwc = new DataWindowChild();
        var CurBmbh = dw_1.GetItemString(1, "bmbh");
        if (curFlag == "TT") {
            var tzlx = dw_1.GetItemString(1, "tzlx");
        }
        if (tzlx == "ck") {
            dw_1.Modify("tzyhzh_t.Text='现金账户:'");
            dw_1.Modify("tzyhzhao_t.Text='------:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='银行账户:' ");
            dw_1.Modify("zryhzhao_t.Text='银行账号:'");
            dw_1.Modify("dqyer_t.Text='余额:'");
            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "0");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve(CurBmbh, "1");
        } else if (tzlx == "tx") {
            dw_1.Modify("tzyhzh_t.Text='银行账户:'");
            dw_1.Modify("tzyhzhao_t.Text='银行账号:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='现金账户:'  ");
            dw_1.Modify("zryhzhao_t.Text='------:'");
            dw_1.Modify("dqyer_t.Text='余额:'");

            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "1");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve(CurBmbh, "0");
        } else if (tzlx == "yhzz") {
            dw_1.Modify("tzyhzh_t.Text='转出账户:'");
            dw_1.Modify("tzyhzhao_t.Text='转出账号:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='转入账户:' ");
            dw_1.Modify("zryhzhao_t.Text='转入账号:'");
            dw_1.Modify("dqyer_t.Text='余额:'");

            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "1");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve(CurBmbh, "1");
        } else if (tzlx == "xjzz") {
            dw_1.Modify("tzyhzh_t.Text='转出账户:'");
            dw_1.Modify("tzyhzhao_t.Text='------:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='转入账户:' ");
            dw_1.Modify("zryhzhao_t.Text='------:'");
            dw_1.Modify("dqyer_t.Text='余额:'");

            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "0");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve(CurBmbh, "0");
        } else if (tzlx == "yhtz") {
            dw_1.Modify("tzyhzh_t.Text='调整账户:'");
            dw_1.Modify("tzyhzhao_t.Text='调整账号:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='------:' ");
            dw_1.Modify("zryhzhao_t.Text='------:'");
            dw_1.Modify("dqyer_t.Text='------:'");

            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "1");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve("", "");
        } else if (tzlx == "xjtz") {
            dw_1.Modify("tzyhzh_t.Text='转出账户:'");
            dw_1.Modify("tzyhzhao_t.Text='------:'");
            dw_1.Modify("dqyez_t.Text='余额:'");
            dw_1.Modify("zryhzh_t.Text='------:' ");
            dw_1.Modify("zryhzhao_t.Text='------:'");
            dw_1.Modify("dqyer_t.Text='------:'");

            dw_1.GetChild("tzyhzh", dwc);
            dwc.Retrieve(CurBmbh, "0");
            dw_1.GetChild("zryhzh", dwc);
            dwc.Retrieve("", "");
        }
    }
}