/// <summary> /// 删除现货交易费用 btnDelete_Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDelete_Click(object sender, EventArgs e) { try { if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No) { return; } DataRow _dr = this.gdvSpotCostsSelect.GetDataRow(this.gdvSpotCostsSelect.FocusedRowHandle); if (_dr == null) { ShowMessageBox.ShowInformation("请选择数据!"); return; } if (!string.IsNullOrEmpty(Convert.ToString(_dr["BreedClassID"]))) { m_BreedClassID = Convert.ToInt32(_dr["BreedClassID"]); } else { m_BreedClassID = AppGlobalVariable.INIT_INT; } if (m_BreedClassID != AppGlobalVariable.INIT_INT) { //注意需要判断多值是,把此品种ID下的所有多值交易手续费删除 m_Result = SpotManageCommon.DeleteSpotCosts(m_BreedClassID); } if (m_Result) { ShowMessageBox.ShowInformation("删除成功!"); m_BreedClassID = AppGlobalVariable.INIT_INT; } else { ShowMessageBox.ShowInformation("删除失败!"); } this.QuerySpotCosts(); } catch (Exception ex) { string errCode = "GL-5422"; string errMsg = "删除现货交易费用失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
/// <summary> /// 根据查询条件,获取港股交易费用 /// </summary> /// <returns></returns> private bool QueryHKCosts() { try { string breedClassName = this.txtBreedClassName.Text; DataSet _dsHKCosts = HKManageCommon.GetAllHKSpotCosts(breedClassName, m_pageNo, m_pageSize, out m_rowCount); DataTable _dtHKCosts; if (_dsHKCosts == null || _dsHKCosts.Tables[0].Rows.Count == 0) { _dtHKCosts = new DataTable(); } else { _dtHKCosts = _dsHKCosts.Tables[0]; } //绑定品种名称 this.ddlBreedClassID.DataSource = HKManageCommon.GetHKSpotCostsBreedClassName().Tables[0]; this.ddlBreedClassID.ValueMember = HKManageCommon.GetHKSpotCostsBreedClassName().Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = HKManageCommon.GetHKSpotCostsBreedClassName().Tables[0].Columns["BreedClassName"].ToString(); //绑定币种类型 this.ddlCurrencyTypeID.DataSource = BindData.GetBindListCurrencyType(); this.ddlCurrencyTypeID.ValueMember = "ValueIndex"; this.ddlCurrencyTypeID.DisplayMember = "TextTitleValue"; //绑定印花税收取方式 this.ddlStampDutyTypeID.DataSource = BindData.GetBindListStampDutyType(); this.ddlStampDutyTypeID.ValueMember = "ValueIndex"; this.ddlStampDutyTypeID.DisplayMember = "TextTitleValue"; this.gdHKCostsResult.DataSource = _dtHKCosts; } catch (Exception ex) { string errCode = "GL-7801"; string errMsg = "根据查询条件,获取港股交易费用失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); throw exception; } return(true); }
/// <summary> /// 绑定(商品)期货持仓限制初始化数据 /// </summary> private void InitBindData() { try { //绑定(商品)期货品种类型的品种名称 this.cmbBreedClassID.Properties.Items.Clear(); this.GetBindSpQhTypeBreedClassName(); this.cmbBreedClassID.SelectedIndex = 0; //绑定交割月份类型 this.cmbDeliveryMonthTypeID.Properties.Items.Clear(); this.cmbDeliveryMonthTypeID.Properties.Items.AddRange(BindData.GetBindListQHCFPositionMonthType()); this.cmbDeliveryMonthTypeID.SelectedIndex = 0; //绑定持仓控制类型 this.cmbPositionBailTypeID.Properties.Items.Clear(); this.cmbPositionBailTypeID.Properties.Items.AddRange(BindData.GetBindListQHPositionBailType()); this.cmbPositionBailTypeID.SelectedIndex = 0; ////绑定上限是否相等 //this.cmbUpperLimitIfEquation.Properties.Items.Clear(); //this.cmbUpperLimitIfEquation.Properties.Items.AddRange(BindData.GetBindListYesOrNo()); //this.cmbUpperLimitIfEquation.SelectedIndex = 0; ////绑定下限是否相等 //this.cmbLowerLimitIfEquation.Properties.Items.Clear(); //this.cmbLowerLimitIfEquation.Properties.Items.AddRange(BindData.GetBindListYesOrNo()); //this.cmbLowerLimitIfEquation.SelectedIndex = 0; ////绑定持仓取值类型 //this.cmbPositionValueTypeID.Properties.Items.Clear(); //this.cmbPositionValueTypeID.Properties.Items.AddRange(BindData.GetBindListQHPositionValueType()); //this.cmbPositionValueTypeID.SelectedIndex = 0; //#region 绑定持仓限制设置类型 add by 董鹏 2010-01-21 //cmbPositionLimitType.Properties.Items.Clear(); //this.cmbPositionLimitType.Properties.Items.AddRange(BindData.GetBindListQHPositionLimitType()); //this.cmbPositionLimitType.SelectedIndex = 0; //#endregion } catch (Exception ex) { string errCode = "GL-6421"; string errMsg = "绑定(商品)期货持仓限制初始化数据失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
//================================ 事件 ================================ #region 现货交易规则管理UI SpotTradeRulesManageUI_Load /// <summary> /// 现货交易规则管理UI SpotTradeRulesManageUI_Load /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SpotTradeRulesManageUI_Load(object sender, EventArgs e) { try { //绑定最小变动价位 this.ddlValueTypeMinChangePrice.DataSource = BindData.GetBindListValueType(); this.ddlValueTypeMinChangePrice.ValueMember = "ValueIndex"; this.ddlValueTypeMinChangePrice.DisplayMember = "TextTitleValue"; //绑定每笔最大委托量单位 this.ddlMaxLeaveQuantityUnit.DataSource = BindData.GetBindListXHAboutUnit(); this.ddlMaxLeaveQuantityUnit.ValueMember = "ValueIndex"; this.ddlMaxLeaveQuantityUnit.DisplayMember = "TextTitleValue"; //绑定是否允许回转 this.ddlIsSlew.DataSource = BindData.GetBindListYesOrNo(); this.ddlIsSlew.ValueMember = "ValueIndex"; this.ddlIsSlew.DisplayMember = "TextTitleValue"; //绑定行情成交量单位 this.ddlMarketUnitID.DataSource = BindData.GetBindListXHAboutUnit(); this.ddlMarketUnitID.ValueMember = "ValueIndex"; this.ddlMarketUnitID.DisplayMember = "TextTitleValue"; //绑定计价单位 this.ddlPriceUnit.DataSource = BindData.GetBindListXHAboutUnit(); this.ddlPriceUnit.ValueMember = "ValueIndex"; this.ddlPriceUnit.DisplayMember = "TextTitleValue"; //绑定品种名称 this.ddlBreedClassID.DataSource = SpotManageCommon.GetBreedClassNameByBreedClassID().Tables[0]; this.ddlBreedClassID.ValueMember = SpotManageCommon.GetBreedClassNameByBreedClassID().Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = SpotManageCommon.GetBreedClassNameByBreedClassID().Tables[0].Columns["BreedClassName"].ToString(); //绑定查询结果 this.m_pageNo = 1; this.gdSpotTradeRulesQResult.DataSource = this.QuerySpotTradeRules(); this.ShowDataPage(); } catch (Exception ex) { string errCode = "GL-5020"; string errMsg = " 现货交易规则管理UI加载失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); } }
/// <summary> /// 根据交易日实体和品种得到最后交易日,当前月份为交割月份 /// </summary> /// <param name="LastTradingDayEntity">交易日实体</param> /// <param name="breedclass">品种ID</param> /// <returns></returns> public int GetLastTradingDay(QH_LastTradingDay LastTradingDayEntity, int breedclass) { try { switch ((int)LastTradingDayEntity.LastTradingDayTypeID) { //第几天 case (int)Types.QHLastTradingDayType.DeliMonthAndDay: if (IsTradingMonth(System.DateTime.Now.Month, breedclass)) { return(DeliMonthOfDay(LastTradingDayEntity, breedclass)); } return(int.MaxValue); //倒数或者顺数第几个交易日 case (int)Types.QHLastTradingDayType.DeliMonthAndDownOrShunAndWeek: if (IsTradingMonth(System.DateTime.Now.Month, breedclass)) { return(DeliMonthOfTurnOrBackTrandingDay(LastTradingDayEntity, breedclass)); } return(int.MaxValue); //交割月份的前一个月份的倒数或者顺数第几个交易日 case (int)Types.QHLastTradingDayType.DeliMonthAgoMonthLastTradeDay: if (IsTradingMonth(System.DateTime.Now.AddMonths(1).Month, breedclass)) { return(DeliMonthOfAgoMonthTradeDay(LastTradingDayEntity, breedclass)); } return(int.MaxValue); //第几周的星期几 case (int)Types.QHLastTradingDayType.DeliMonthAndWeek: if (IsTradingMonth(System.DateTime.Now.Month, breedclass)) { return(DeliMonthOfWeekDay(LastTradingDayEntity, breedclass)); } return(int.MaxValue); } } catch (Exception ex) { string errCode = "GL-7001"; string errMsg = "根据类型求和约的最后交易日失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); } return(int.MaxValue); }
/// <summary> /// 根据查询条件,获取港股交易规则 /// </summary> /// <returns></returns> private bool QueryHKTradeRules() { try { string breedClassName = this.txtBreeClassName.Text; DataSet _dsHKTradeRules = HKManageCommon.GetAllHKSpotTradeRules(breedClassName, m_pageNo, m_pageSize, out m_rowCount); DataTable _dtHKTradeRule; if (_dsHKTradeRules == null || _dsHKTradeRules.Tables[0].Rows.Count == 0) { _dtHKTradeRule = new DataTable(); } else { _dtHKTradeRule = _dsHKTradeRules.Tables[0]; } //绑定品种名称 this.ddlBreedClassID.DataSource = HKManageCommon.GetHKBreedClassNameByBreedClassID().Tables[0]; this.ddlBreedClassID.ValueMember = HKManageCommon.GetHKBreedClassNameByBreedClassID().Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = HKManageCommon.GetHKBreedClassNameByBreedClassID().Tables[0].Columns["BreedClassName"].ToString(); //绑定行情成交量单位 this.ddlMarketUnitID.DataSource = BindData.GetBindListXHAboutUnit(); this.ddlMarketUnitID.ValueMember = "ValueIndex"; this.ddlMarketUnitID.DisplayMember = "TextTitleValue"; //绑定计价单位 this.ddlPriceUnit.DataSource = BindData.GetBindListXHAboutUnit(); this.ddlPriceUnit.ValueMember = "ValueIndex"; this.ddlPriceUnit.DisplayMember = "TextTitleValue"; this.gdHKTradeRulesQResult.DataSource = _dtHKTradeRule; } catch (Exception ex) { string errCode = "GL-7901"; string errMsg = "根据查询条件,获取港股交易规则失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); //throw exception; return(false); } return(true); }
/// <summary> /// 更新交割月份(包括添加,删除) /// </summary> /// <param name="addMonthID">需要添加的月份ID</param> /// <param name="deleteMonthID">需要删除的月份ID</param> /// <param name="BreedClassID">品种ID</param> /// <returns></returns> public bool UpdateQHAgreementDeliveryMonth(List <int> addMonthID, List <int> deleteMonthID, int BreedClassID) { QH_AgreementDeliveryMonthDAL qHAgreementDeliveryMonthDAL = new QH_AgreementDeliveryMonthDAL(); QH_AgreementDeliveryMonth QH_AgreementDeliveryMonth = new QH_AgreementDeliveryMonth(); QH_AgreementDeliveryMonth.BreedClassID = BreedClassID; DbConnection Conn = null; Database db = DatabaseFactory.CreateDatabase(); Conn = db.CreateConnection(); if (Conn.State != ConnectionState.Open) { Conn.Open(); } DbTransaction Tran = Conn.BeginTransaction(); try { foreach (int addM in addMonthID) { QH_AgreementDeliveryMonth.MonthID = addM; int a = qHAgreementDeliveryMonthDAL.Add(QH_AgreementDeliveryMonth, Tran, db); } foreach (int deleM in deleteMonthID) { QH_AgreementDeliveryMonth.MonthID = deleM; qHAgreementDeliveryMonthDAL.Delete(deleM, BreedClassID, Tran, db); } Tran.Commit(); return(true); } catch (Exception ex) { Tran.Rollback(); string errCode = "GL-6060"; string errMsg = "更新交割月份(包括添加,删除)失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } finally { if (Conn.State == ConnectionState.Open) { Conn.Close(); } } }
//================================ 事件 ================================ #region 现货单位换算管理窗体 SpotUnitConversionManageUI_Load /// <summary> /// 现货单位换算管理窗体 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SpotUnitConversionManageUI_Load(object sender, EventArgs e) { try { //初次加载时,更新按钮禁用 //btnModify.Enabled = false; //绑定交易规则表中的品种ID对应的品种名称 this.cmbBreedClassID.Properties.Items.Clear(); this.GetBindBreedClassName(); //获取交易规则表中的品种ID对应的品种名称 this.cmbBreedClassID.SelectedIndex = 0; //绑定品种名称 this.ddlBreedClassID.DataSource = SpotManageCommon.GetCMUnitConversionBreedClassName().Tables[0]; this.ddlBreedClassID.ValueMember = SpotManageCommon.GetCMUnitConversionBreedClassName().Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = SpotManageCommon.GetCMUnitConversionBreedClassName().Tables[0].Columns["BreedClassName"].ToString(); //绑定从单位 From this.cmbUnitIDFrom.Properties.Items.Clear(); this.cmbUnitIDFrom.Properties.Items.AddRange(BindData.GetBindListXHAboutUnit()); this.cmbUnitIDFrom.SelectedIndex = 0; //绑定到单位 To this.cmbUnitIDTo.Properties.Items.Clear(); this.cmbUnitIDTo.Properties.Items.AddRange(BindData.GetBindListXHAboutUnit()); this.cmbUnitIDTo.SelectedIndex = 0; //绑定查询结果 this.m_pageNo = 1; this.gdSpotUnitConversionRelult.DataSource = this.QuerySpotUnitConversion(); this.ShowDataPage(); //禁用文本框的编辑状态 this.cmbBreedClassID.Enabled = false; this.cmbUnitIDFrom.Enabled = false; this.cmbUnitIDTo.Enabled = false; this.txtValue.Enabled = false; this.btnOK.Enabled = false; } catch (Exception ex) { string errCode = "GL-5700"; string errMsg = "现货单位换算管理窗体加载失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
/// <summary> /// 根据查询条件,获取港股交易商品 /// </summary> /// <returns></returns> private bool QueryHKCommodity() { try { //港股商品代码 string HKCommodityCode = AppGlobalVariable.INIT_STRING; //港股商品名称 string HKCommodityName = AppGlobalVariable.INIT_STRING; if (!string.IsNullOrEmpty(txtCondition.Text)) { HKCommodityCode = txtCondition.Text; HKCommodityName = txtCondition.Text; } DataSet _dsHKCommodity = HKManageCommon.GetAllHKCommodity(HKCommodityCode, HKCommodityName, m_pageNo, m_pageSize, out m_rowCount); DataTable _dtHKCommodity; if (_dsHKCommodity == null || _dsHKCommodity.Tables[0].Rows.Count == 0) { _dtHKCommodity = new DataTable(); } else { _dtHKCommodity = _dsHKCommodity.Tables[0]; } //绑定交易商品品种表中的品种ID对应的品种名称 string strWhere = " BreedClassTypeID=4 or DeleteState=1 "; this.ddlBreedClassID.DataSource = CommonParameterSetCommon.GetList(strWhere).Tables[0]; this.ddlBreedClassID.ValueMember = CommonParameterSetCommon.GetList(strWhere).Tables[0].Columns["BreedClassID"].ToString(); this.ddlBreedClassID.DisplayMember = CommonParameterSetCommon.GetList(strWhere).Tables[0].Columns["BreedClassName"].ToString(); this.gdHKCommodityResult.DataSource = _dtHKCommodity; } catch (Exception ex) { string errCode = "GL-7701"; string errMsg = "根据查询条件,获取港股交易商品失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } return(true); }
//================================ 事件 ================================ #region 期货交易规则管理UI FuturesTradeRulesManageUI_Load /// <summary> /// 期货交易规则管理UI FuturesTradeRulesManageUI_Load /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FuturesTradeRulesManageUI_Load(object sender, EventArgs e) { try { //绑定是否允许回转 this.ddlIsSlew.DataSource = BindData.GetBindListYesOrNo(); this.ddlIsSlew.ValueMember = "ValueIndex"; this.ddlIsSlew.DisplayMember = "TextTitleValue"; //绑定合约交易月份是否包含春节 this.ddlIfContainCNewYear.DataSource = BindData.GetBindListYesOrNo(); this.ddlIfContainCNewYear.ValueMember = "ValueIndex"; this.ddlIfContainCNewYear.DisplayMember = "TextTitleValue"; //绑定涨跌停板幅度类型 this.ddlHighLowStopScopeID.DataSource = BindData.GetBindListQHHighLowStopALLType();// GetBindListQHHighLowStopType(); this.ddlHighLowStopScopeID.ValueMember = "ValueIndex"; this.ddlHighLowStopScopeID.DisplayMember = "TextTitleValue"; //绑定交易单位 this.ddlUnitsID.DataSource = BindData.GetBindListQHAboutUnit(); this.ddlUnitsID.ValueMember = "ValueIndex"; this.ddlUnitsID.DisplayMember = "TextTitleValue"; //绑定计价单位 this.ddlPriceUnit.DataSource = BindData.GetBindListQHPriceUnit(); this.ddlPriceUnit.ValueMember = "ValueIndex"; this.ddlPriceUnit.DisplayMember = "TextTitleValue"; //绑定行情成交量单位 this.ddlMarketUnitID.DataSource = BindData.GetBindListQHAboutUnit(); this.ddlMarketUnitID.ValueMember = "ValueIndex"; this.ddlMarketUnitID.DisplayMember = "TextTitleValue"; //绑定查询结果 this.m_pageNo = 1; this.gdFuturesTradeRulesResult.DataSource = this.QueryFuturesTradeRules(); this.ShowDataPage(); } catch (Exception ex) { string errCode = "GL-5820"; string errMsg = "期货交易规则管理UI加载失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
/// <summary> /// 更新现货交易规则 /// </summary> /// <param name="model">现货_品种_交易规则实体</param> /// <returns></returns> public bool UpdateSpotTradeRules(ManagementCenter.Model.XH_SpotTradeRules model) { try { return(xH_SpotTradeRulesDAL.UpdateSpotTradeRules(model)); } catch (Exception ex) { string errCode = "GL-5203"; string errMsg = "更新现货交易规则失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 根据现货规则表中的品种ID获取品种名称 /// </summary> /// <returns></returns> public DataSet GetBreedClassNameByBreedClassID() { try { return(xH_SpotTradeRulesDAL.GetBreedClassNameByBreedClassID()); } catch (Exception ex) { string errCode = "GL-5206"; string errMsg = "根据现货规则表中的品种ID获取品种名称失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 根据查询条件获取所有的现货_品种_交易规则(查询条件可为空) /// </summary> /// <param name="strWhere">查询条件</param> /// <returns></returns> public List <ManagementCenter.Model.XH_SpotTradeRules> GetListArray(string strWhere) { try { return(xH_SpotTradeRulesDAL.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-5205"; string errMsg = "根据查询条件获取所有的现货_品种_交易规则失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 根据查询条件获取所有的交易规则委托量(查询条件可为空) /// </summary> /// <param name="strWhere">查询条件</param> /// <returns></returns> public List <ManagementCenter.Model.QH_ConsignQuantum> GetListArray(string strWhere) { try { return(qH_ConsignQuantumDAL.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-6024"; string errMsg = "根据查询条件获取所有的交易规则委托量(查询条件可为空)失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 根据撮合机得到撮合机撮合的代码 /// </summary> /// <param name="MatchMachineID"></param> /// <returns></returns> public DataSet GetCodeListByMatchMachineID(int MatchMachineID) { try { return(dal.GetCodeListByMatchMachineID(MatchMachineID)); } catch (Exception ex) { string errCode = "GL-2241"; string errMsg = "根据撮合机得到撮合机撮合的代码失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 修改可交易商品_熔断 /// </summary> /// <param name="model">可交易商品_熔断实体</param> /// <returns></returns> public bool UpdateCMCommodityFuse(CM_CommodityFuse model) { try { return(cM_CommodityFuseDAL.Update(model)); } catch (Exception ex) { string errCode = "GL-6702"; string errMsg = " 修改可交易商品_熔断失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 删除可交易商品_熔断 /// </summary> /// <param name="CommodityCode">商品代码</param> /// <returns></returns> public bool DeleteCMCommodityFuse(string CommodityCode) { try { return(cM_CommodityFuseDAL.Delete(CommodityCode)); } catch (Exception ex) { string errCode = "GL-6703"; string errMsg = "删除可交易商品_熔断失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 根据查询条件获取所有的商品期货_保证金比例(查询条件可为空) /// </summary> /// <param name="strWhere">查询条件</param> /// <returns></returns> public List <ManagementCenter.Model.QH_CFBailScaleValue> GetListArray(string strWhere) { try { return(qH_CFBailScaleValueDAL.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-6604"; string errMsg = "根据查询条件获取所有的商品期货_保证金比例(查询条件可为空失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 根据查询条件获取所有的合约交割月份(查询条件可为空) /// </summary> /// <param name="strWhere">查询条件</param> /// <returns></returns> public List <ManagementCenter.Model.QH_AgreementDeliveryMonth> GetListArray(string strWhere) { try { return(qH_AgreementDeliveryMonthDAL.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-6061"; string errMsg = "根据查询条件获取所有的合约交割月份(查询条件可为空)失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 删除商品期货_保证金比例 /// </summary> /// <param name="CFBailScaleValueID">商品期货_保证金比例ID</param> /// <returns></returns> public bool DeleteQHCFBailScaleValue(int CFBailScaleValueID) { try { return(qH_CFBailScaleValueDAL.Delete(CFBailScaleValueID)); } catch (Exception ex) { string errCode = "GL-6602"; string errMsg = "删除商品期货_保证金比例失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 更新商品期货_保证金比例 /// </summary> /// <param name="model">商品期货_保证金比例实体</param> /// <returns></returns> public bool UpdateQHCFBailScaleValue(ManagementCenter.Model.QH_CFBailScaleValue model) { try { return(qH_CFBailScaleValueDAL.Update(model)); } catch (Exception ex) { string errCode = "GL-6601"; string errMsg = "更新商品期货_保证金比例失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 获取权限组列表 /// </summary> /// <param name="strWhere"></param> /// <returns></returns> public List <ManagementCenter.Model.UM_ManagerGroup> GetListArray(string strWhere) { try { return(dal.GetListArray(strWhere)); } catch (Exception ex) { string errCode = "GL-1304"; string errMsg = "获取权限组列表失败!"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 得到交易所没有分配的商品代码 /// </summary> /// <param name="BourseTypeID"></param> /// <returns></returns> public DataSet GetNotAssignCodeByBourseTypeID(int BourseTypeID) { try { return(dal.GetNotAssignCodeByBourseTypeID(BourseTypeID)); } catch (Exception ex) { string errCode = "GL-2242"; string errMsg = "得到交易所没有分配的商品代码失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); return(null); } }
/// <summary> /// 添加商品期货_保证金比例 /// </summary> /// <param name="model">商品期货_保证金比例实体</param> /// <returns></returns> public int AddQHCFBailScaleValue(ManagementCenter.Model.QH_CFBailScaleValue model) { try { return(qH_CFBailScaleValueDAL.Add(model)); } catch (Exception ex) { string errCode = "GL-6600"; string errMsg = "添加商品期货_保证金比例失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(AppGlobalVariable.INIT_INT); } }
/// <summary> /// 品种名称组合框索引值改变事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbBreedClassID_SelectedIndexChanged(object sender, EventArgs e) { try { TestInputTurnovervolumeText(); } catch (Exception ex) { string errCode = "GL-4207"; string errMsg = "品种名称组合框索引值改变事件失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }
private void btn_Refresh_Click(object sender, EventArgs e) { try { MatchCenterBLL.CenterTestConnection(); LoadCenterList(); } catch (Exception ex) { string errCode = "GL-2005"; string errMsg = "刷新状态失败"; VTException vte = new VTException(errCode, errMsg, ex); LogHelper.WriteError(vte.ToString(), vte.InnerException); } }
/// <summary> /// 是否存在该记录 /// </summary> public bool ExistsCommodityCode(string CommodityCode) { try { return(cM_CommodityFuseDAL.Exists(CommodityCode)); } catch (Exception ex) { string errCode = "GL-6700"; string errMsg = "判断可交易商品_熔断中的记录是否存在失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 根据交易规则委托量标识删除交易规则和单笔最大委托量 /// </summary> /// <param name="ConsignQuantumID">交易规则委托量ID</param> /// <returns></returns> public bool DeleteQHConsignQuantumAndSingle(int ConsignQuantumID) { try { return(DeleteQHConsignQuantumAndSingle(ConsignQuantumID, null, null, false)); } catch (Exception ex) { string errCode = "GL-6025"; string errMsg = "根据交易规则委托量标识删除交易规则和单笔最大委托量失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(false); } }
/// <summary> /// 根据商品期货_保证金比例ID获取商品期货_保证金比例对象实体 /// </summary> /// <param name="CFBailScaleValueID">商品期货_保证金比例ID</param> /// <returns></returns> public ManagementCenter.Model.QH_CFBailScaleValue GetQHCFBailScaleValueModel(int CFBailScaleValueID) { try { return(qH_CFBailScaleValueDAL.GetModel(CFBailScaleValueID)); } catch (Exception ex) { string errCode = "GL-6603"; string errMsg = "根据商品期货_保证金比例ID获取商品期货_保证金比例对象实体失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }
/// <summary> /// 根据查询条件获取所有的港股行业(查询条件可为空) /// </summary> /// <param name="strWhere">查询条件</param> /// <returns></returns> public List <ManagementCenter.Model.HKProfessionInfo> GetListArray(string strWhere) { try { return(hKProfessionInfoDAL.GetListArray(strWhere)); } catch (Exception ex) { string errCode = ""; string errMsg = ""; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return(null); } }