文章目录 金蝶云星空表单插件实现父窗体打开子窗体,并携带参数到子窗体 父窗体打开子窗体准备 设置携带参数 打开子窗体 子窗体接收参数
金蝶云星空表单插件实现父窗体打开子窗体,并携带参数到子窗体
父窗体打开子窗体准备
BillShowParameter OtherInAdd = new BillShowParameter ( ) { FormId = FormIdConst. STK_MISCELLANEOUS, ParentPageId = base . View. PageId, Status = OperationStatus. ADDNEW, AllowNavigation = false , } ;
设置携带参数
#region 携带参数 OtherInAdd. CustomParams. Add ( "FAfterType" , afterType) ; OtherInAdd. CustomParams. Add ( "FIsSerial" , IsSerial. ToString ( ) ) ; OtherInAdd. CustomParams. Add ( "FIDList" , string . Join ( "," , idList) ) ; OtherInAdd. CustomParams. Add ( "FEntryList" , entryList) ; #endregion
打开子窗体
OtherInAdd. OpenStyle. ShowType = ShowType. MainNewTabPage; OtherInAdd. OpenStyle. TagetKey = "FMainTab" ; OtherInAdd. CreateWebParams ( ) ; this . View. ShowForm ( OtherInAdd) ;
子窗体接收参数
public override void OnInitialize ( InitializeEventArgs e) { base . OnInitialize ( e) ; if ( e. Paramter. GetCustomParameters ( ) . ContainsKey ( "FIDList" ) ) { this . idList = e. Paramter. GetCustomParameter ( "FIDList" ) + "" ; } if ( e. Paramter. GetCustomParameters ( ) . ContainsKey ( "FEntryList" ) ) { this . entryList = e. Paramter. GetCustomParameter ( "FEntryList" ) + "" ; } if ( e. Paramter. GetCustomParameters ( ) . ContainsKey ( "FAfterType" ) ) { this . afterType = e. Paramter. GetCustomParameter ( "FAfterType" ) + "" ; } }