//================================ 事件 ================================ #region 添加或修改合约交割月份UI AgreementDeliMonthManageUI_Load /// <summary> /// 添加或修改合约交割月份UI AgreementDeliMonthManageUI_Load /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AgreementDeliMonthManageUI_Load(object sender, EventArgs e) { try { //绑定期货交易规则表中的品种ID对应的品种名称 //this.cmbBreedClassID.Properties.Items.Clear(); //this.GetBindBreedClassName(); //获取期货交易规则表中的品种ID对应的品种名称 //this.cmbBreedClassID.SelectedIndex = 0; labBreedClassName.Text = SpotManageCommon.GetBreedClassNameByID(m_BreedClassID); List <QH_AgreementDeliveryMonth> MonthID = new List <QH_AgreementDeliveryMonth>(); MonthID = FuturesManageCommon.GetQHAgreementDeliveryMonth(m_BreedClassID); foreach (Control c in this.panelControl1.Controls) { if (c is DevExpress.XtraEditors.CheckEdit) { DevExpress.XtraEditors.CheckEdit checkEdit = (DevExpress.XtraEditors.CheckEdit)c; int id = int.Parse(c.Name.Substring(9)); CheckTag ct = new CheckTag(); ct.ID = id; ct.InitIsChecked = false; checkEdit.Checked = false; foreach (QH_AgreementDeliveryMonth i in MonthID) { if (i.MonthID == id) { ct.InitIsChecked = true; checkEdit.Checked = true; } } c.Tag = ct; } } } catch (Exception ex) { string errCode = "GL-5870"; string errMsg = "添加或修改合约交割月份UI加载失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }