/// <summary> /// 当前UI是修改最后交易日UI时,初始化控件的值 UpdateInitData /// </summary> private void UpdateInitData() { try { if (UpdateLastTradingDayID != AppGlobalVariable.INIT_INT) { QH_LastTradingDay qH_LastTradingDay = FuturesManageCommon.GetQHLastTradingDayModel(UpdateLastTradingDayID); if (qH_LastTradingDay != null) { if (qH_LastTradingDay.LastTradingDayTypeID != 0) { foreach (object item in this.cmbLastTradingDayType.Properties.Items) { if (((UComboItem)item).ValueIndex == qH_LastTradingDay.LastTradingDayTypeID) { this.cmbLastTradingDayType.SelectedItem = item; break; } } } else { this.cmbLastTradingDayType.SelectedIndex = 0; } if (qH_LastTradingDay.Week != 0) { foreach (object item in this.cmbWeek.Properties.Items) { if (((UComboItem)item).ValueIndex == qH_LastTradingDay.Week) { this.cmbWeek.SelectedItem = item; break; } } } else { this.cmbWeek.SelectedIndex = 0; } if (qH_LastTradingDay.Sequence != 0) { foreach (object item in this.cmbSequence.Properties.Items) { if (((UComboItem)item).ValueIndex == qH_LastTradingDay.Sequence) { this.cmbSequence.SelectedItem = item; break; } } } else { this.cmbSequence.SelectedIndex = 0; } this.speWhatDay.Text = qH_LastTradingDay.WhatDay.ToString(); this.speWhatWeek.Text = qH_LastTradingDay.WhatWeek.ToString(); m_LastTradingDayID = qH_LastTradingDay.LastTradingDayID; } } } catch (Exception ex) { string errCode = "GL-5842"; string errMsg = "当前UI是修改最后交易日UI时,初始化控件的值失败!"; VTException exception = new VTException(errCode, errMsg, ex); LogHelper.WriteError(exception.ToString(), exception.InnerException); return; } }