/// <summary> /// 根据查询条件,获取商品期货_保证金比例 /// </summary> /// <returns></returns> private bool QueryQHCFBailScaleValue() { try { string BreedClassName = this.txtBreedClassName.Text; int PositionBailTypeID = AppGlobalVariable.INIT_INT; int DeliveryMonthTypeID = AppGlobalVariable.INIT_INT; if (!string.IsNullOrEmpty(cmbPositionBailTypeID.Text)) { PositionBailTypeID = ((UComboItem)cmbPositionBailTypeID.SelectedItem).ValueIndex; } if (!string.IsNullOrEmpty(cmbDeliveryMonthTypeID.Text)) { ; DeliveryMonthTypeID = ((UComboItem)cmbDeliveryMonthTypeID.SelectedItem).ValueIndex; } DataSet _dsQHCFBailScaleV = FuturesManageCommon.GetAllQHCFBailScaleValue(BreedClassName, DeliveryMonthTypeID, PositionBailTypeID, m_pageNo, m_pageSize, out m_rowCount); DataTable _dtQHCFBailScaleV; if (_dsQHCFBailScaleV == null || _dsQHCFBailScaleV.Tables[0].Rows.Count == 0) { _dtQHCFBailScaleV = new DataTable(); } else { _dtQHCFBailScaleV = _dsQHCFBailScaleV.Tables[0]; int _CFBailScaleValueID = 0;//商品期货保证金比例ID for (int i = 0; i < _dtQHCFBailScaleV.Rows.Count; i++) { _CFBailScaleValueID = 0; if (_dtQHCFBailScaleV.Rows[i][10] != System.DBNull.Value) { _CFBailScaleValueID = Convert.ToInt32(_dtQHCFBailScaleV.Rows[i][10]); } if (_CFBailScaleValueID != 0) { for (int j = 0; j < _dtQHCFBailScaleV.Rows.Count; j++) { if (Convert.ToInt32(_dtQHCFBailScaleV.Rows[j][1]) == _CFBailScaleValueID) { _dtQHCFBailScaleV.Rows.RemoveAt(j); i++; break; } } } } } //绑定商品期货类型的品种名称 this.ddlBreedClassID.DataSource = CommonParameterSetCommon.GetSpQhTypeBreedClassName().Tables[0]; this.ddlBreedClassID.ValueMember = CommonParameterSetCommon.GetSpQhTypeBreedClassName().Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = CommonParameterSetCommon.GetSpQhTypeBreedClassName().Tables[0].Columns["BreedClassName"].ToString(); this.gdCFBailScaleValueResult.DataSource = _dtQHCFBailScaleV; } catch (Exception ex) { string errCode = "GL-6445"; string errMsg = "根据查询条件,获取商品期货_保证金比例失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } return(true); }