///<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_CXFASZ_Edit() {

	 var self=this;
	 this.Instance=null;
	 var requestor= new PBWindow();
	 var cb_Emportsp= new CommandButton( requestor );
	 var dw_top= new DataWindow( requestor );
	 var tab_1= new TabControl( requestor );
	 var dw_bm= 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(cb_Emportsp == null ) cb_Emportsp= new CommandButton( requestor );
		 cb_Emportsp.Attach( win.Control( "cb_Emportsp") ); 
		 if(dw_top == null ) dw_top= new DataWindow( requestor );
		 dw_top.Attach( win.Control( "dw_top") ); 
		 if(tab_1 == null ) tab_1= new TabControl( requestor );
		 tab_1.Attach( win.Control( "tab_1") ); 
		 if(dw_bm == null ) dw_bm= new DataWindow( requestor );
		 dw_bm.Attach( win.Control( "dw_bm") ); 

		 if(typeof(self.Emportsp)=="function") 
			 win.AttachEvent("cb_Emportsp","Clicked",self.Emportsp); 

		 if(typeof(self.Cancal)=="function") 
			 win.AttachEvent("cb_4","Clicked",self.Cancal); 

		 if(typeof(self.DeleteRow)=="function") 
			 win.AttachEvent("cb_5","Clicked",self.DeleteRow); 

		 if(typeof(self.SaveAll)=="function") 
			 win.AttachEvent("cb_2","Clicked",self.SaveAll); 

		 if(typeof(self.Cancal)=="function") 
			 win.AttachEvent("cb_1","Clicked",self.Cancal); 

		

		 if(typeof(self.dw_bm_click)=="function") 
			 win.AttachEvent("dw_bm","Clicked",self.dw_bm_click); 

	 }

	 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(); 

		 cb_Emportsp.Detach(); cb_Emportsp=null; 
		 dw_top.Detach(); dw_top=null; 
		 tab_1.Detach(); tab_1=null; 
		 dw_bm.Detach(); dw_bm=null; 
		 requestor.Detach(); requestor=null; 

		 setTimeout(CollectGarbage, 100); 
	 }

	 //以上代码由设计器自动生成,请不要手工修改
	 //ExtPB.Net JavaScript End  设计器查找标志,请不要删除或修改
    this.Cancal = function () {
        requestor.Close();
    }

    //#region 导出
//    this.Emportsp = function () {
//       alert("xxxx")
//        
//        //获取当前的数据窗口

//        if (dw_kh.RowCount() > 0) {
//            dw_kh.Export();
//        }
//    }
    //#endregion

  
  
 }