Exemple #1
0
        /// <summary>
        /// 获取需要更新的交易所类型数据 UpdateCMBourseType
        /// </summary>
        /// <param name="handle"></param>
        private void UpdateCMBourseType(int handle)
        {
            try
            {
                if (handle < 0)
                {
                    return;
                }
                //// 显示添加交易所类型UI
                //AddBourseUI addBourseUI = new AddBourseUI();
                //addBourseUI.EditType = (int) UITypes.EditTypeEnum.UpdateUI;
                //显示添加交易时间窗体
                TradeTimeManagerUI tradeTimeManagerUI = new TradeTimeManagerUI();
                tradeTimeManagerUI.EditType = (int)UITypes.EditTypeEnum.UpdateUI;
                DataRow       _dr           = this.gdvBourseTypeSelect.GetDataRow(handle);
                int           bourseTypeID  = Convert.ToInt32(_dr["BourseTypeID"]);
                CM_BourseType cM_BourseType = CommonParameterSetCommon.GetCMBourseTypeModel(bourseTypeID);
                tradeTimeManagerUI.CMBourseType = cM_BourseType;

                if (tradeTimeManagerUI.ShowDialog(this) == DialogResult.OK)
                {
                    this.QueryCMBourseType();
                    this.gdvBourseTypeSelect.FocusedRowHandle = handle;
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-4402";
                string      errMsg    = "获取需要更新的现货交易费用数据失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
Exemple #2
0
 /// <summary>
 /// 显示添加交易所类型UI
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         //AddBourseUI addBourseUI = new AddBourseUI();
         //addBourseUI.ShowDialog();
         //显示添加交易时间窗体
         TradeTimeManagerUI tradeTimeManagerUI = new TradeTimeManagerUI();
         tradeTimeManagerUI.EditType = (int)UITypes.EditTypeEnum.AddUI;
         tradeTimeManagerUI.ShowDialog();
         this.QueryCMBourseType();
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-4401";
         string      errMsg    = "显示添加交易所类型UI失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }