private void CustGridControl_Prices() { UFWebClientGridAdapter adapter = new UFWebClientGridAdapter(this.DataGrid5); string str = adapter.getSelectedValuePK("DiscountType"); int EnumValus = (int)AllEnumBE.DiscountTypeEnumData.PercentValues; string expression = "debugger;if(" + str + "==" + EnumValus + ")"; CodeBlock codeBlock = new CodeBlock(); AssociationControl control = this.CreateAssociationControl(this.DataGrid5, codeBlock, "OnBeforeCellFocusEnter", expression); string[] strArray = new string[] { "Prices" }; List <string[]> list = new List <string[]>(); list.Add(new string[] { "Prices", "false", "" }); list.Add(new string[] { "CurrencyType", "false", "" }); foreach (string str2 in strArray) { adapter.FireEventCols.Add(str2); } foreach (string[] strArray2 in list) { adapter.EnabledCols.Add(new string[] { strArray2[0], strArray2[1], strArray2[2] }); } codeBlock.TargetControls.addControl(adapter); }
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); }
public object cF_DoCustomerAction(CustomerActionEventArgs args) { ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid5.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; int num = Convert.ToInt32(hs["DiscountType"]); // UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid5); if (num == (int)AllEnumBE.DiscountTypeEnumData.FixedValues)//固定值 { //比例清空 不可以输入 grid.CellValue.Add(new Object[] { rowIndex, "Discount", new string[] { "0.0000%", "0.0000%", "0.0000%" } }); this.DataGrid5.Columns["Discount"].Enabled = false; this.DataGrid5.Columns["Prices"].Enabled = true; } else { //价格清空,不可输入 grid.CellValue.Add(new Object[] { rowIndex, "Prices", new string[] { "0", "0", "0" } }); this.DataGrid5.Columns["Prices"].Enabled = false; this.DataGrid5.Columns["Discount"].Enabled = true; } args.ArgsResult.Add(grid.ClientInstanceWithValue); return(args); }
private void RegisterGridCellEnableTrue(IUFDataGrid grid) { AssociationControl gridCellDataChangedASC = new AssociationControl(); gridCellDataChangedASC.SourceServerControl = grid; gridCellDataChangedASC.SourceControl.EventName = "OnBeforeCellFocusEnter"; CodeBlock codeBlock = new CodeBlock(); string expression = ""; expression = "if("; UFWebClientGridAdapter webClientGridAdapter = null; webClientGridAdapter = new UFWebClientGridAdapter(grid); expression += webClientGridAdapter.getSelectedValuePK("DiscountType"); expression += "=="; expression += "0"; expression += ")"; codeBlock.Condition = expression; webClientGridAdapter.FireEventCols.Add("DiscountPrice"); webClientGridAdapter.FireEventCols.Add("DiscountRate"); webClientGridAdapter.EnabledCols.Add(new object[] { "DiscountPrice", "true", "" }); webClientGridAdapter.EnabledCols.Add(new object[] { "DiscountRate", "false", "" }); codeBlock.TargetControls.addControl(webClientGridAdapter); gridCellDataChangedASC.addBlock(codeBlock); }
private void Register_DataGrid_BeforeDeleteLine_PoskBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid8; assocControl.SourceControl.EventName = "OnBeforeRowDelete";//OnBeforeRowAdd CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid8); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnBeforeRowDelete"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = this.DataGrid8 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(itemGriding_GridCustomerPostBackEvent); //ClientCallBackFrm cf = new ClientCallBackFrm(); //cf.ParameterControls.Add(this.DataGrid8); //cf.DoCustomerAction += new ClientCallBackFrm.ActionCustomer(cf_DoCustomerAction); //cf.Add(assocControl); //this.Controls.Add(cf); }
private void CustGridControlForTrue() { UFWebClientGridAdapter adapter = new UFWebClientGridAdapter(this.DataGrid0); string str = adapter.getSelectedValuePK("ArrirmState"); string expression = "debugger;if(" + adapter.getSelectedValuePK("ArrirmState") + "=='false')"; CodeBlock codeBlock = new CodeBlock(); AssociationControl control = this.CreateAssociationControl(this.DataGrid0, codeBlock, "OnBeforeCellFocusEnter", expression); //使列不可用 // //this.DataGrid5.r string[] strArray = new string[] { "SubKey", "Dosage", "Tier" }; List <string[]> list = new List <string[]>(); list.Add(new string[] { "SubKey", "true", "" }); list.Add(new string[] { "Dosage", "true", "" }); list.Add(new string[] { "Tier", "true", "" }); foreach (string str2 in strArray) { adapter.FireEventCols.Add(str2); } foreach (string[] strArray2 in list) { adapter.EnabledCols.Add(new string[] { strArray2[0], strArray2[1], strArray2[2] }); } codeBlock.TargetControls.addControl(adapter); }
private object UnitQtyChange_CustomCallback(CustomerActionEventArgs args) { this.DataCollect(); this.DataBinding(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid0.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; if (list.Count != 0) { int rowIndexUI = int.Parse(list[0].ToString()); decimal unitQty = 0; if (hs["Dosage"] != null && string.IsNullOrEmpty(hs["Dosage"].ToString()) == false) { unitQty = decimal.Parse(hs["Dosage"].ToString()); } ReturnUpDownBrokerageDTOData dto = this.CurrentState["DTO"] as ReturnUpDownBrokerageDTOData; decimal demandQty = 0; if (dto != null) { demandQty = unitQty * dto.Qty; } UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid0); grid.CellValue.Add(new Object[] { rowIndex, "NeedNumber", new string[] { demandQty.ToString(), demandQty.ToString(), demandQty.ToString() } }); args.ArgsResult.Add(grid.ClientInstanceWithValue); } return(args); }
private object RateChange_CustomCallback(CustomerActionEventArgs args) { this.DataCollect(); this.DataBinding(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid0.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; if (list.Count != 0) { int rowIndexUI = int.Parse(list[0].ToString()); decimal rate = Convert.ToDecimal(hs["DiscountRate"]); decimal qty = Convert.ToDecimal(hs["SOLine_OrderByQtyTU"]); decimal exportPrice = Convert.ToDecimal(hs["ExportPrice"]); decimal FinallyPrice = exportPrice - exportPrice * rate; decimal money = exportPrice * qty - FinallyPrice * qty; decimal totalMoney = FinallyPrice * qty; UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid0); grid.CellValue.Add(new Object[] { rowIndex, "SOLine_FinallyPriceTC", new string[] { FinallyPrice.ToString(), FinallyPrice.ToString(), FinallyPrice.ToString() } }); grid.CellValue.Add(new Object[] { rowIndex, "CalAmount", new string[] { money.ToString(), money.ToString(), money.ToString() } }); grid.CellValue.Add(new Object[] { rowIndex, "DiscountMoney", new string[] { totalMoney.ToString(), totalMoney.ToString(), totalMoney.ToString() } }); args.ArgsResult.Add(grid.ClientInstanceWithValue); } return(args); }
object DataGrid4_Price_OnCellDataChanged(CustomerActionEventArgs args) { if (DataGrid4 == null) { DataGrid4 = (IUFDataGrid)part.GetUFControlByName(part.TopLevelContainer, "DataGrid4"); } this.part.DataCollect(); this.part.DataBinding(); DataGrid4.BindData(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[DataGrid4.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; UFWebClientGridAdapter grid = new UFWebClientGridAdapter(DataGrid4); if (!String.IsNullOrEmpty(hs["OrderPriceTC"].ToString()) && decimal.Parse(hs["OrderPriceTC"].ToString()) > 0) { //定价 decimal price = String.IsNullOrEmpty(hs["OrderPriceTC"] + "") ? decimal.Zero : decimal.Parse(hs["OrderPriceTC"].ToString()); //外销价 decimal DescFlexField_PrivateDescSeg5 = String.IsNullOrEmpty(hs["DescFlexField_PrivateDescSeg5"] + "") ? decimal.Zero : decimal.Parse(hs["DescFlexField_PrivateDescSeg5"].ToString()); //如果无勾选特价,定价必须小于等于外销价 //如果勾选特价,外销价可以小于定价,也可以大于定价。。。 if (price > 0) { if (DescFlexField_PrivateDescSeg5 > 0) { if (price != DescFlexField_PrivateDescSeg5) { price = DescFlexField_PrivateDescSeg5; } } //if (String.IsNullOrEmpty(DescFlexField_PrivateDescSeg1) || "false".ToUpper().Equals(DescFlexField_PrivateDescSeg1.ToUpper())) //{ // if (DescFlexField_PrivateDescSeg5 >= price) // price = DescFlexField_PrivateDescSeg5; //} //else //{ // price = DescFlexField_PrivateDescSeg5; //} //行记录 grid.CellValue.Add(new Object[] { rowIndex, "DescFlexField_PrivateDescSeg5", new string[] { price.ToString(), price.ToString(), price.ToString() } }); } args.ArgsResult.Add(grid.ClientInstanceWithValue); } return(args); }
// <summary> /// 注册表格单元格内容改变的回调事件 /// </summary> private void RegisterGridCellDataChangedPostBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid1; assocControl.SourceControl.EventName = "GridRowClicked"; //((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("Gift"); CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid1); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "GridRowClicked"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = this.DataGrid1 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(GridCellOnChanged_DoCustomerAction_Grid); }
private void Register_DataGrid_BeforeDeleteLine_PoskBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid1; assocControl.SourceControl.EventName = "OnBeforeRowDelete";//OnBeforeRowAdd CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid1); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnBeforeRowDelete"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = this.DataGrid1 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(itemGrid_GridCustomerPostBackEvent); }
private void CellDataChangedPostBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid5; assocControl.SourceControl.EventName = "OnCellDataChanged"; ((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("BillNoid"); CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid5); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnCellDataChanged";//OnCellDataValueChanged cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = this.DataGrid5 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(itemGrid_GridCustomerPostBackEvent); }
/// <summary> /// 注册表格单元格内容改变的回调事件 /// </summary> private void SumDeliveryCellDataChangedPostBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid13; assocControl.SourceControl.EventName = "OnCellDataValueChanged"; ((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("InstalledArkNumber"); CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid13); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnCellDataValueChanged"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = this.DataGrid13 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(GridCellOnChanged_DoCustomerAction_Grid); }
/// <summary> /// /// </summary> private void QryCellDataChangedPostBack() { AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = this.DataGrid1; assocControl.SourceControl.EventName = "OnCellClick"; //((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("SONo"); CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(this.DataGrid1); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnCellClick"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid qryGrid = this.DataGrid1 as UFGrid; qryGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(qryGrid_GridCustomerPostBackEvent); }
private object RowInsert_CustomCallback(CustomerActionEventArgs args) { string curRowIndex = args.ArgsHash[UFWebClientGridAdapter.FocusRow].ToString(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid1.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid1); grid.CellValue.Add(new Object[] { curRowIndex, "NeedUom", new string[] { this.Model.OrderBomHead.FocusedRecord.DosageUnit.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Code.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Name.ToString() } }); grid.CellValue.Add(new Object[] { curRowIndex, "NeedUom_Round_Precision", new string[] { this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_Precision.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_Precision.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_Precision.ToString() } }); grid.CellValue.Add(new Object[] { curRowIndex, "NeedUom_Round_RoundType", new string[] { this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundType.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundType.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundType.ToString() } }); grid.CellValue.Add(new Object[] { curRowIndex, "NeedUom_Round_RoundValue", new string[] { this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundValue.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundValue.ToString(), this.Model.OrderBomHead.FocusedRecord.DosageUnit_Round_RoundValue.ToString() } }); args.ArgsResult.Add(grid.ClientInstanceWithValue); return(args); }
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 object RowInsert_CustomCallback(CustomerActionEventArgs args) { string curRowIndex = args.ArgsHash[UFWebClientGridAdapter.FocusRow].ToString(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid1.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid1); if (this.CurrentState["So_ID"] != null && this.CurrentState["So_DocNo"] != null) { long So_ID = Convert.ToInt64(this.CurrentState["So_ID"] + ""); grid.CellValue.Add(new Object[] { curRowIndex, "SellOrderID", new long[] { So_ID, So_ID, So_ID } }); grid.CellValue.Add(new Object[] { curRowIndex, "SellOrderRowNo", new string[] { this.CurrentState["So_DocNo"] + "", this.CurrentState["So_DocNo"] + "", this.CurrentState["So_DocNo"] + "" } }); // grid.CellValue.Add(new Object[] { curRowIndex, "CostMonery", new decimal[] { 3, 3, 3 } }); } args.ArgsResult.Add(grid.ClientInstanceWithValue); return(args); }
private void Register_DataGrid4_ExportPrice_PostBack() { if (DataGrid4 == null) { DataGrid4 = (IUFDataGrid)part.GetUFControlByName(part.TopLevelContainer, "DataGrid4"); } AssociationControl assocControl = new AssociationControl(); assocControl.SourceServerControl = DataGrid4; assocControl.SourceControl.EventName = "OnCellDataChanged"; ((IUFClientAssoGrid)assocControl.SourceControl).FireEventCols.Add("DescFlexField_PrivateDescSeg5"); CodeBlock cb = new CodeBlock(); UFWebClientGridAdapter gridAdapter = new UFWebClientGridAdapter(DataGrid4); gridAdapter.IsPostBack = true; gridAdapter.PostBackTag = "OnCellDataChanged"; cb.TargetControls.addControl(gridAdapter); assocControl.addBlock(cb); UFGrid itemGrid = DataGrid4 as UFGrid; itemGrid.GridCustomerPostBackEvent += new GridCustomerPostBackDelegate(GridCellOnChanged_DoCustomerAction_Grid); }
object DataGrid4_Price_OnCellDataChanged(CustomerActionEventArgs args) { this.DataCollect(); this.DataBinding(); this.DataGrid0.BindData(); ArrayList list = (ArrayList)args.ArgsHash[UFWebClientGridAdapter.ALL_GRIDDATA_SelectedRows]; ArrayList lstAllData = (ArrayList)args.ArgsHash[this.DataGrid0.ClientID]; int colIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusColumn"]); //取列号 int rowIndex = Convert.ToInt32(args.ArgsHash["ALL_GRIDDATA_FocusRow"]); //取行号 Hashtable hs = lstAllData[rowIndex] as Hashtable; UFWebClientGridAdapter grid = new UFWebClientGridAdapter(this.DataGrid0); int num = Convert.ToInt32(hs["BrokerageType"]);//类型 decimal DescFlexField_PrivateDescSeg30 = String.IsNullOrEmpty(hs["DescFlexField_PrivateDescSeg30"] + "") ? decimal.Zero : decimal.Parse(hs["DescFlexField_PrivateDescSeg30"].ToString()); if (num == (int)AllEnumBE.DiscountTypeEnumData.FixedValues)//固定值 { decimal price = String.IsNullOrEmpty(hs["Prices"].ToString()) ? decimal.Zero : decimal.Parse(hs["Prices"].ToString()); if (price < 0L || price > DescFlexField_PrivateDescSeg30) { grid.CellValue.Add(new Object[] { rowIndex, "price", new string[] { price.ToString(), price.ToString(), price.ToString() } }); args.ArgsResult.Add(grid.ClientInstanceWithValue); } } else if (num == (int)AllEnumBE.DiscountTypeEnumData.PercentValues)//百分比 { decimal BrokerageRatio = String.IsNullOrEmpty(hs["BrokerageRatio"].ToString()) ? decimal.Zero : decimal.Parse(hs["BrokerageRatio"].ToString()); if (BrokerageRatio < 0L || BrokerageRatio > DescFlexField_PrivateDescSeg30) { grid.CellValue.Add(new Object[] { rowIndex, "BrokerageRatio", new string[] { BrokerageRatio.ToString(), BrokerageRatio.ToString(), BrokerageRatio.ToString() } }); args.ArgsResult.Add(grid.ClientInstanceWithValue); } } return(args); }