private void Register_CallBack_Qty_Action() { //结合控件 UFSoft.UBF.UI.WebControls.Association.AssociationControl ac = new AssociationControl(); ac.SourceServerControl = (UFSoft.UBF.UI.ControlModel.IUFDataGrid) this.DataGrid5; //设定事件名称,经验证区分大小写,可查看portal\js\对应控件.js //事件名参考\Portal\js\DataGrid.js,<!--DataGrid控件事件名称常量定义--> 节点 //DataGrid事件,OnBeforeCellFocusEnter等验证能触发 ac.SourceControl.EventName = "OnCellDataChanged"; //查看事件的方法 //UFSoft.UBF.UI.WebControls.Association.UFDateGridEventName.OnCellFocusEnter //加入触发事件的列名,先转成Adapter UFSoft.UBF.UI.WebControls.Association.Adapter.UFWebClientGridAdapter adapter1 = ((UFWebClientGridAdapter)ac.SourceControl); adapter1.FireEventCols.Add("ThisCancelQty"); //客户端刷新框架 ClientCallBackFrm cF = new ClientCallBackFrm(); //加入相关控件(才可取其值) cF.ParameterControls.Add((IUFControl)this.DataGrid5); cF.Add(ac); //加事件 cF.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(cF_DoCustomerAction); }
private void Register_DataGrid4_Price_CallBack() { if (DataGrid4 == null) { return; } //2)创建表格适配器对象 UFWebClientGridAdapter _clientGrid = new UFWebClientGridAdapter(DataGrid4); //3)注册:事件源、事件名称、事件关联的列 AssociationControl AssCtrl = new AssociationControl(); AssCtrl.SourceServerControl = DataGrid4; AssCtrl.SourceControl.EventName = "OnCellDataChanged"; ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("OrderPriceTC"); ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("OrderByQtyTU"); ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("DescFlexField_PrivateDescSeg5"); ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("DescFlexField_PrivateDescSeg1"); //4)创建:CallBack窗体、事件方法、CallBack对象、事件相关 ClientCallBackFrm frm = new ClientCallBackFrm(); frm.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(DataGrid4_Price_OnCellDataChanged); //添加参数控件 frm.ParameterControls.Add(DataGrid4); frm.Add(AssCtrl); }
private void Register_CallBack_FDDocType_DoCustomerAction() { //结合控件 UFSoft.UBF.UI.WebControls.Association.AssociationControl ac = new AssociationControl(); //设定触发源 ac.SourceServerControl = (UFSoft.UBF.UI.ControlModel.IUFFldReference) this.txtOrderOrg; if (ac.SourceServerControl == null) { return; } //设定事件名称,经验证区分大小写,可查看portal\js\对应控件.js //对应js文件中有: add_onchange: function (handler) ac.SourceControl.EventName = "OnValueChanged"; //查看事件的方法 //UFSoft.UBF.UI.WebControls.Association.UFReferenceEventName.OnContentChanged //客户端刷新框架 ClientCallBackFrm cF = new ClientCallBackFrm(); //加入相关控件(才可取其值) cF.ParameterControls.Add((IUFControl)this.txtOrderOrg); cF.Add(ac); //加事件 cF.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(CallBack_FDDocType_DoCustomerAction); }
private void CustGridCallToPostBackByRowAdded() { AssociationControl asso = new AssociationControl(); asso.SourceServerControl = this.DataGrid1; asso.SourceControl.EventName = "OnAfterRowAdded"; ClientCallBackFrm cf = new ClientCallBackFrm(); cf.ParameterControls.Add(this.DataGrid1); cf.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(RowInsert_CustomCallback); cf.Add(asso); this.Controls.Add(cf); }
private void UnitQtyCustGridCallToPostBack() { AssociationControl asso = new AssociationControl(); asso.SourceServerControl = this.DataGrid0; asso.SourceControl.EventName = "OnCellDataChanged"; ((IUFClientAssoGrid)asso.SourceControl).FireEventCols.Add("Dosage");//列对应的字段名称 ClientCallBackFrm cf = new ClientCallBackFrm(); cf.ParameterControls.Add(this.DataGrid0); cf.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(UnitQtyChange_CustomCallback); cf.Add(asso); this.Controls.Add(cf); }
private void Register_DataGrid4_Price_CallBack() { //2)创建表格适配器对象 UFWebClientGridAdapter _clientGrid = new UFWebClientGridAdapter(this.DataGrid0); //3)注册:事件源、事件名称、事件关联的列 AssociationControl AssCtrl = new AssociationControl(); AssCtrl.SourceServerControl = this.DataGrid0; AssCtrl.SourceControl.EventName = "OnCellDataChanged"; ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("Prices"); ((UFWebClientGridAdapter)AssCtrl.SourceControl).FireEventCols.Add("BrokerageRatio"); //4)创建:CallBack窗体、事件方法、CallBack对象、事件相关 ClientCallBackFrm frm = new ClientCallBackFrm(); frm.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(DataGrid4_Price_OnCellDataChanged); //添加参数控件 frm.ParameterControls.Add(this.DataGrid0); frm.Add(AssCtrl); }
private void Register_CallBack_Fee_DoCustomerAction() { //结合控件 UFSoft.UBF.UI.WebControls.Association.AssociationControl ac = new AssociationControl(); //设定触发源(可以设定多个,如多事件触发) ac.SourceServerControl = (UFSoft.UBF.UI.ControlModel.IUFDataGrid) this.DataGrid5; ac.SourceControl.EventName = "OnCellDataChanged"; //加入触发事件的列名,先转成Adapter UFSoft.UBF.UI.WebControls.Association.Adapter.UFWebClientGridAdapter adapter1 = ((UFWebClientGridAdapter)ac.SourceControl); adapter1.FireEventCols.Add("DiscountType"); //折扣方式 adapter1.FireEventCols.Add("Discount"); //折扣 adapter1.FireEventCols.Add("Prices"); //价格 //客户端刷新框架 ClientCallBackFrm cF = new ClientCallBackFrm(); //加入相关控件(才可取其值) cF.ParameterControls.Add((IUFControl)this.DataGrid5); cF.Add(ac); //加事件 cF.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(cF_DoCustomerAction); }