Exemple #1
0
        /// <summary>
        /// 删除交易商品
        /// </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.gdvCommoditySelect.GetDataRow(this.gdvCommoditySelect.FocusedRowHandle);
                if (_dr == null)
                {
                    ShowMessageBox.ShowInformation("请选择数据!");
                    return;
                }
                if (!string.IsNullOrEmpty(Convert.ToString(_dr["CommodityCode"])))
                {
                    m_CommodityCode = Convert.ToString(_dr["CommodityCode"]);
                }
                else
                {
                    m_CommodityCode = AppGlobalVariable.INIT_STRING;
                }
                int breedClassID = Convert.ToInt32(_dr["BreedClassID"]);//品种ID
                if (m_CommodityCode != AppGlobalVariable.INIT_STRING)
                {
                    //m_Result = CommonParameterSetCommon.DeleteCMCommodity(m_CommodityCode, breedClassID);
                    int _ISSysDefaultCode = Convert.ToInt32(_dr["ISSysDefaultCode"]);
                    if (_ISSysDefaultCode == (int)GTA.VTS.Common.CommonObject.Types.IsYesOrNo.No)
                    {
                        m_Result = CommonParameterSetCommon.DeleteCMCommodity(m_CommodityCode, breedClassID);
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("系统默认代码不能删除!");
                        return;
                    }
                }
                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_CommodityCode = AppGlobalVariable.INIT_STRING;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryCMCommodity();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-4202";
                string      errMsg    = "删除交易商品失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);

                return;
            }
        }
        /// <summary>
        /// 删除商品期货_保证金比例
        /// </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.gdCFBailScaleValueSelect.GetDataRow(this.gdCFBailScaleValueSelect.FocusedRowHandle);
                if (_dr == null)
                {
                    ShowMessageBox.ShowInformation("请选择数据!");
                    return;
                }

                if (!string.IsNullOrEmpty(Convert.ToString(_dr["CFBailScaleValueID"])))
                {
                    m_CFBailScaleValueID = Convert.ToInt32(_dr["CFBailScaleValueID"]);
                }
                else
                {
                    m_CFBailScaleValueID = AppGlobalVariable.INIT_INT;
                }

                if (m_CFBailScaleValueID != AppGlobalVariable.INIT_INT)
                {
                    QH_CFBailScaleValue qH_CFBailScaleVal = FuturesManageCommon.GetQHCFBailScaleValueModel(m_CFBailScaleValueID);
                    //当子ID的数据存在时,则删除子数据,无论子数据是否删除成功,都继续执行删除当前的记录
                    if (qH_CFBailScaleVal.RelationScaleID != AppGlobalVariable.INIT_INT ||
                        string.IsNullOrEmpty(qH_CFBailScaleVal.RelationScaleID.Value.ToString()))
                    {
                        FuturesManageCommon.DeleteQHCFBailScaleValue(Convert.ToInt32(qH_CFBailScaleVal.RelationScaleID));
                    }
                    m_Result = FuturesManageCommon.DeleteQHCFBailScaleValue(m_CFBailScaleValueID);
                }

                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_CFBailScaleValueID = AppGlobalVariable.INIT_INT;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryQHCFBailScaleValue();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-6446";
                string      errMsg    = "删除商品期货_保证金比例失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
 /// <summary>
 /// 删除按纽事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Del_Click(object sender, EventArgs e)
 {
     try
     {
         if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
         {
             return;
         }
         if (this.ViewRightGroup != null && this.ViewRightGroup.FocusedRowHandle >= 0)
         {
             m_cutRow = this.ViewRightGroup.FocusedRowHandle;
             DataRow dw             = ViewRightGroup.GetDataRow(m_cutRow);
             int     ManagerGroupID = int.Parse(dw["ManagerGroupID"].ToString());
             ManagementCenter.BLL.UM_ManagerBeloneToGroupBLL ManagerBeloneToGroupBLL =
                 new UM_ManagerBeloneToGroupBLL();
             List <UM_ManagerBeloneToGroup> l =
                 ManagerBeloneToGroupBLL.GetListArray(string.Format("ManagerGroupID={0}", ManagerGroupID));
             if (l == null)
             {
                 return;
             }
             if (l.Count > 0)
             {
                 ShowMessageBox.ShowInformation("该权限组下存在管理员,不允许删除!");
                 return;
             }
             if (ManagerGroupBLL.Delete(ManagerGroupID))
             {
                 ShowMessageBox.ShowInformation("删除成功!");
                 LoadRightGroup();
                 return;
             }
             else
             {
                 ShowMessageBox.ShowInformation("删除失败!");
                 return;
             }
         }
         else
         {
             ShowMessageBox.ShowInformation("请选中记录行");
         }
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-1204";
         string      errMsg    = "删除权限组失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
 }
Exemple #4
0
        /// <summary>
        /// 删除港股交易费用
        /// </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.gdvHKCostsSelect.GetDataRow(this.gdvHKCostsSelect.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)
                {
                    m_Result = HKManageCommon.DeleteHKSpotCosts(m_BreedClassID);
                }

                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_BreedClassID = AppGlobalVariable.INIT_INT;
                    this.QueryHKCosts();
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-7806";
                string      errMsg    = "删除港股交易费用失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
Exemple #5
0
        /// <summary>
        /// 删除交易所类型
        /// </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.gdvBourseTypeSelect.GetDataRow(this.gdvBourseTypeSelect.FocusedRowHandle);
                if (_dr == null)
                {
                    ShowMessageBox.ShowInformation("请选择数据!");
                    return;
                }
                int  BourseTypeID = Convert.ToInt32(_dr["BourseTypeID"]);
                bool Result       = false;//结果变量
                //int breedClassID = Convert.ToInt32(_dr["BreedClassID"]);//品种ID
                if (BourseTypeID != AppGlobalVariable.INIT_INT)
                {
                    int ISSysDefaultBourseType = Convert.ToInt32(_dr["ISSysDefaultBourseType"]);
                    if (ISSysDefaultBourseType == (int)GTA.VTS.Common.CommonObject.Types.IsYesOrNo.No)
                    {
                        Result = CommonParameterSetCommon.DeleteCMBourseTypeAbout(BourseTypeID);
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("系统默认交易所不能删除!");
                        return;
                    }
                }
                if (Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryCMBourseType();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-";
                string      errMsg    = "删除交易所类型失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);

                return;
            }
        }
        /// <summary>
        /// 删除(商品)期货_持仓限制
        /// </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.gdPositionLimitValueSelect.GetDataRow(this.gdPositionLimitValueSelect.FocusedRowHandle);
                if (_dr == null)
                {
                    ShowMessageBox.ShowInformation("请选择数据!");
                    return;
                }

                if (!string.IsNullOrEmpty(Convert.ToString(_dr["PositionLimitValueID"])))
                {
                    m_PositionLimitValueID = Convert.ToInt32(_dr["PositionLimitValueID"]);
                }
                else
                {
                    m_PositionLimitValueID = AppGlobalVariable.INIT_INT;
                }

                if (m_PositionLimitValueID != AppGlobalVariable.INIT_INT)
                {
                    m_Result = FuturesManageCommon.DeleteQHPositionLimitValue(m_PositionLimitValueID);
                }

                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_PositionLimitValueID = AppGlobalVariable.INIT_INT;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryQHPositionLimitValue();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-6466";
                string      errMsg    = "删除(商品)期货_持仓限制失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
 /// <summary>
 /// 删除可交易商品_熔断
 /// </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.gdCommodityFuseSelect.GetDataRow(this.gdCommodityFuseSelect.FocusedRowHandle);
         if (_dr == null)
         {
             ShowMessageBox.ShowInformation("请选择数据!");
             return;
         }
         if (!string.IsNullOrEmpty(Convert.ToString(_dr["CommodityCode"])))
         {
             m_CommodityCode = _dr["CommodityCode"].ToString();
         }
         else
         {
             m_CommodityCode = AppGlobalVariable.INIT_STRING;
         }
         if (m_CommodityCode != AppGlobalVariable.INIT_STRING)
         {
             //  m_Result = CommonParameterSetCommon.DeleteCMCommodityFuse(m_CommodityCode);
             m_Result = CommonParameterSetCommon.DeleteCMCommodityFuseAbout(m_CommodityCode);
         }
         if (m_Result)
         {
             ShowMessageBox.ShowInformation("删除成功!");
             m_CommodityCode = AppGlobalVariable.INIT_STRING;
         }
         else
         {
             ShowMessageBox.ShowInformation("删除失败!");
         }
         this.QueryCMCommodityFuse();
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-6803";
         string      errMsg    = "删除可交易商品_熔断失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }
        /// <summary>
        /// 删除交易所类型_非交易日期
        /// </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.gdvNotTradeDateSelect.GetDataRow(this.gdvNotTradeDateSelect.FocusedRowHandle);
                if (_dr == null)
                {
                    ShowMessageBox.ShowInformation("请选择数据!");
                    return;
                }
                if (!string.IsNullOrEmpty(Convert.ToString(_dr["NotTradeDateID"])))
                {
                    m_NotTradeDateID = Convert.ToInt32(_dr["NotTradeDateID"]);
                }
                else
                {
                    m_NotTradeDateID = AppGlobalVariable.INIT_INT;
                }
                if (m_NotTradeDateID != AppGlobalVariable.INIT_INT)
                {
                    m_Result = CommonParameterSetCommon.DeleteCMNotTradeDate(m_NotTradeDateID);
                }
                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_NotTradeDateID = AppGlobalVariable.INIT_INT;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryCMNotTradeDate();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-4422";
                string      errMsg    = " 删除交易所类型_非交易日期失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);

                return;
            }
        }
Exemple #9
0
        /// <summary>
        /// 删除按纽事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_Del_Click(object sender, EventArgs e)
        {
            try
            {
                string mess;
                if (this.ViewUser != null && this.ViewUser.FocusedRowHandle >= 0)
                {
                    if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.Yes)
                    {
                        CT_CounterBLL CounterBLL = new CT_CounterBLL();

                        if (!CounterBLL.TestCenterConnection())
                        {
                            MessageBox.Show("柜台服务连接失败,请检查柜台服务是否开启!", "系统提示");
                            return;
                        }
                        m_cutRow = this.ViewUser.FocusedRowHandle;
                        DataRow dw     = ViewUser.GetDataRow(m_cutRow);
                        int     UserID = int.Parse(dw["UserID"].ToString());
                        ManagementCenter.BLL.UserManage.TransactionManage TransactionManage
                            = new ManagementCenter.BLL.UserManage.TransactionManage();
                        if (TransactionManage.DelTransaction(UserID, out mess))
                        {
                            ShowMessageBox.ShowInformation("删除成功!");
                            InitUserList();
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation(mess);
                        }
                    }
                }
                else
                {
                    ShowMessageBox.ShowInformation("请选中记录行!");
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-0325";
                string      errMsg    = "删除交易员失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), ex);
                ShowMessageBox.ShowInformation(exception.ToString());
            }
        }
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
         {
             return;
         }
         DataRow _dr = this.gdvMinVolumeOfBusSelect.GetDataRow(this.gdvMinVolumeOfBusSelect.FocusedRowHandle);
         if (_dr == null)
         {
             ShowMessageBox.ShowInformation("请选择数据!");
             return;
         }
         if (!string.IsNullOrEmpty(Convert.ToString(_dr["MinVolumeOfBusinessID"])))
         {
             m_MinVolumeOfBusinessID = Convert.ToInt32(_dr["MinVolumeOfBusinessID"]);
         }
         else
         {
             m_MinVolumeOfBusinessID = AppGlobalVariable.INIT_INT;
         }
         if (m_MinVolumeOfBusinessID != AppGlobalVariable.INIT_INT)
         {
             m_Result = SpotManageCommon.DeleteXHMinVolumeOfBusByID(m_MinVolumeOfBusinessID);
         }
         if (m_Result)
         {
             ShowMessageBox.ShowInformation("删除成功!");
             m_MinVolumeOfBusinessID = AppGlobalVariable.INIT_INT;
         }
         else
         {
             ShowMessageBox.ShowInformation("删除失败!");
         }
         this.QueryMinVolumeOfBusiness();
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-5082";
         string      errMsg    = "删除现货最小交易单位失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
 }
        private void Btn_Del_Click(object sender, EventArgs e)
        {
            try
            {
                if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
                {
                    return;
                }
                if (this.ViewCounter != null && this.ViewCounter.FocusedRowHandle >= 0)
                {
                    m_cutRow = this.ViewCounter.FocusedRowHandle;
                    DataRow dw       = ViewCounter.GetDataRow(m_cutRow);
                    int     CouterID = int.Parse(dw["CouterID"].ToString());

                    {
                        //检测该柜台下是否存在用户
                        UM_UserInfoBLL     UserInfoBLL = new UM_UserInfoBLL();
                        List <UM_UserInfo> l           = UserInfoBLL.GetListArray(string.Format("CouterID={0}", CouterID));
                        if (l != null && l.Count > 0)
                        {
                            ShowMessageBox.ShowInformation("该柜台下存在交易员,不允许删除此柜台!");
                            return;
                        }
                    }
                    CounterBLL.Delete(CouterID);
                    ShowMessageBox.ShowInformation("删除成功!");
                    InitCounterList();
                }
                else
                {
                    ShowMessageBox.ShowInformation("请选中记录行!");
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("删除失败!");
                string      errCode   = "GL-3004";
                string      errMsg    = "删除失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
Exemple #12
0
        /// <summary>
        /// 删除按纽事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Del_Click(object sender, EventArgs e)
        {
            try
            {
                if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
                {
                    return;
                }
                DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hi =
                    this.ViewCenter.CalcHitInfo(((Control)sender).PointToClient(Control.MousePosition));
                if (this.ViewCenter != null && this.ViewCenter.FocusedRowHandle >= 0)
                {
                    m_cutRow = this.ViewCenter.FocusedRowHandle;

                    DataRow dw            = ViewCenter.GetDataRow(m_cutRow);
                    int     MatchCenterID = int.Parse(dw["MatchCenterID"].ToString());
                    ManagementCenter.BLL.RC_MatchMachineBLL _MatchMachineBLL = new RC_MatchMachineBLL();
                    DataSet ds = _MatchMachineBLL.GetList(string.Format("MatchCenterID={0}", MatchCenterID));
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        ShowMessageBox.ShowInformation("该中心下存在撮合机,不允许删除!");
                        return;
                    }
                    MatchCenterBLL.Delete(MatchCenterID);
                    ShowMessageBox.ShowInformation("删除成功!");
                    SetTextValue(null);
                    SetControlEnAbled();
                    LoadCenterList();
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("删除失败!");
                string      errCode = "GL-2002";
                string      errMsg  = "删除失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
            }
            SetTextValue(null);
            SetControlEnAbled();
        }
Exemple #13
0
        /// <summary>
        /// 删除按纽事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Del_Click(object sender, EventArgs e)
        {
            try
            {
                if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
                {
                    return;
                }
                if (this.ViewMachine != null && this.ViewMachine.FocusedRowHandle >= 0)
                {
                    m_cutRow = this.ViewMachine.FocusedRowHandle;
                    //MachineUpdate(m_cutRow);
                    DataRow dw             = ViewMachine.GetDataRow(m_cutRow);
                    int     MatchMachineID = int.Parse(dw["MatchMachineID"].ToString());

                    if (MatchMachineBLL.Delete(MatchMachineID))
                    {
                        ShowMessageBox.ShowInformation("删除成功!");
                        Init();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("删除失败!");
                    }
                }
                else
                {
                    ShowMessageBox.ShowInformation("请选中记录行!");
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("删除失败!");
                string      errCode = "GL-2020";
                string      errMsg  = "删除失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
            }
        }
Exemple #14
0
 private void Btn_Del_Click(object sender, EventArgs e)
 {
     if (this.ViewManage != null && this.ViewManage.FocusedRowHandle >= 0)
     {
         if (ShowMessageBox.ShowQuestion("确认删除此用户?") == DialogResult.No)
         {
             return;
         }
         try
         {
             m_cutRow = this.ViewManage.FocusedRowHandle;
             DataRow dw     = ViewManage.GetDataRow(m_cutRow);
             int     UserID = int.Parse(dw["UserID"].ToString());
             if (UserInfoBLL.ManagerDelete(UserID))
             {
                 ShowMessageBox.ShowInformation("删除成功!");
                 LoadManagerList();
             }
             else
             {
                 ShowMessageBox.ShowInformation("删除失败!");
             }
         }
         catch (Exception ex)
         {
             ShowMessageBox.ShowInformation("删除失败!");
             string      errCode   = "GL-1004";
             string      errMsg    = "删除失败!";
             VTException exception = new VTException(errCode, errMsg, ex);
             LogHelper.WriteError(exception.ToString(), exception.InnerException);
         }
     }
     else
     {
         ShowMessageBox.ShowInformation("请选中记录行");
     }
 }
        /// <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.gdvSpotTradeRulesSelect.GetDataRow(this.gdvSpotTradeRulesSelect.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 (!string.IsNullOrEmpty(Convert.ToString(_dr["BreedClassValidID"])))
                {
                    m_BreedClassValidID = Convert.ToInt32(_dr["BreedClassValidID"]);
                }
                else
                {
                    m_BreedClassValidID = AppGlobalVariable.INIT_INT;
                }

                if (!string.IsNullOrEmpty(Convert.ToString(_dr["BreedClassHighLowID"])))
                {
                    m_BreedClassHighLowID = Convert.ToInt32(_dr["BreedClassHighLowID"]);
                }
                else
                {
                    m_BreedClassHighLowID = AppGlobalVariable.INIT_INT;
                }
                //删除需要实现当交易规则删除时,港股的最小变动价位的删除
                if (m_BreedClassID != AppGlobalVariable.INIT_INT)
                {
                    // m_Result = SpotManageCommon.DeleteSpotTradeRules(m_BreedClassID, m_BreedClassHighLowID,
                    // m_BreedClassValidID);
                    m_Result = SpotManageCommon.DeleteSpotTradeRulesAboutAll(m_BreedClassID);
                }

                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_BreedClassID        = AppGlobalVariable.INIT_INT;
                    m_BreedClassHighLowID = AppGlobalVariable.INIT_INT;
                    m_BreedClassValidID   = AppGlobalVariable.INIT_INT;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QuerySpotTradeRules();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-5022";
                string      errMsg    = "删除现货交易规则失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
        /// <summary>
        /// 删除期货交易规则
        /// </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.gdvFuturesTradeRulesSelect.GetDataRow(this.gdvFuturesTradeRulesSelect.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 (!string.IsNullOrEmpty(Convert.ToString(_dr["LastTradingDayID"])))
                {
                    m_LastTradingDayID = Convert.ToInt32(_dr["LastTradingDayID"]);
                }
                else
                {
                    m_LastTradingDayID = AppGlobalVariable.INIT_INT;
                }

                if (!string.IsNullOrEmpty(Convert.ToString(_dr["ConsignQuantumID"])))
                {
                    m_ConsignQuantumID = Convert.ToInt32(_dr["ConsignQuantumID"]);
                }
                else
                {
                    m_ConsignQuantumID = AppGlobalVariable.INIT_INT;
                }
                if (m_BreedClassID != AppGlobalVariable.INIT_INT)
                {
                    m_Result = FuturesManageCommon.DeleteFuturesTradeRulesAboutAll(m_BreedClassID);
                }

                if (m_Result)
                {
                    ShowMessageBox.ShowInformation("删除成功!");
                    m_BreedClassID     = AppGlobalVariable.INIT_INT;
                    m_LastTradingDayID = AppGlobalVariable.INIT_INT;
                    m_ConsignQuantumID = AppGlobalVariable.INIT_INT;
                }
                else
                {
                    ShowMessageBox.ShowInformation("删除失败!");
                }
                this.QueryFuturesTradeRules();
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-5824";
                string      errMsg    = "删除期货交易规则数据失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
 /// <summary>
 /// 删除交易时间
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDeleteTradeTime_Click(object sender, EventArgs e)
 {
     try
     {
         if (gdvTradeTimeSelect.DataSource != null && gdvTradeTimeSelect.RowCount > 0)
         {
             if (EditType == (int)UITypes.EditTypeEnum.AddUI)
             {
                 if (_dtTradeTime != null || _dtTradeTime.Rows.Count > 0)
                 {
                     _dtTradeTime.Rows.Remove(gdvTradeTimeSelect.GetDataRow(gdvTradeTimeSelect.FocusedRowHandle));
                     gdTradeTimeResult.DataSource = _dtTradeTime;
                 }
             }
             else if (EditType == (int)UITypes.EditTypeEnum.UpdateUI)
             {
                 if (ShowMessageBox.ShowQuestion("确认删除吗?") == DialogResult.No)
                 {
                     return;
                 }
                 DataRow _dr = gdvTradeTimeSelect.GetDataRow(gdvTradeTimeSelect.FocusedRowHandle);
                 if (_dr == null)
                 {
                     ShowMessageBox.ShowInformation("请选择数据!");
                     return;
                 }
                 if (!string.IsNullOrEmpty(Convert.ToString(_dr["TradeTimeID"])))
                 {
                     m_TradeTimeID = Convert.ToInt32(_dr["TradeTimeID"]);
                 }
                 else
                 {
                     m_TradeTimeID = AppGlobalVariable.INIT_INT;
                 }
                 if (m_TradeTimeID != AppGlobalVariable.INIT_INT)
                 {
                     m_Result = CommonParameterSetCommon.DeleteCMTradeTime(m_TradeTimeID);
                 }
                 if (m_Result)
                 {
                     ShowMessageBox.ShowInformation("交易时间删除成功!");
                     m_TradeTimeID = AppGlobalVariable.INIT_INT;
                 }
                 else
                 {
                     ShowMessageBox.ShowInformation("交易时间删除失败!");
                 }
                 QueryCMTradeTime();
             }
             if (m_IsCompareRow != 0)
             {
                 m_IsCompareRow--;//执行一次删除,已经比较的记录就减一次
             }
         }
     }
     catch (Exception ex)
     {
         string errCode   = "GL-4442";
         string errMsg    = "删除交易所类型_交易时间失败!";
         var    exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }