/// <summary>
 /// 加载柜台列表
 /// </summary>
 private void LoadCounter()
 {
     try
     {
         DataSet ds = CounterBLL.GetPagingCounter(QueryCounter, this.m_pageNo, this.m_pageSize,
                                                  out this.m_rowCount);
         DataTable allCounter;
         if (ds == null || ds.Tables[0].Rows.Count == 0)
         {
             allCounter = new DataTable();
             if (!isFirstInit)
             {
                 ShowMessageBox.ShowInformation("不存在记录!");
             }
         }
         else
         {
             allCounter = ds.Tables[0];
         }
         this.gridCounter.DataSource = allCounter;
     }
     catch (Exception ex)
     {
         //写日志
         string      errCode   = "GL-3002";
         string      errMsg    = "加载柜台列表失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
     isFirstInit = false;
 }
        /// <summary>
        /// 修改柜台信息
        /// </summary>
        /// <param name="handle">当前行</param>
        private void CounterUpdate(int handle)
        {
            try
            {
                if (handle < 0)
                {
                    return;
                }
                CounterEdit counterEdit = new CounterEdit();
                counterEdit.EditType = 2;
                DataRow dw       = ViewCounter.GetDataRow(handle);
                int     CouterID = int.Parse(dw["CouterID"].ToString());

                CT_Counter Counter = CounterBLL.GetModel(CouterID);
                counterEdit.Counter = Counter;
                if (counterEdit.ShowDialog(this) == DialogResult.OK)
                {
                    InitCounterList();
                    this.ViewCounter.FocusedRowHandle = handle;
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("修改柜台信息失败!");
                string      errCode   = "GL-3005";
                string      errMsg    = "修改柜台信息失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 修改管理员
        /// </summary>
        /// <param name="handle">当前行</param>
        private void ManagerUpdate(int handle)
        {
            try
            {
                if (handle < 0)
                {
                    return;
                }
                ManagerEdit managerEdit = new ManagerEdit();
                managerEdit.EditType = 2;
                DataRow dw     = ViewManage.GetDataRow(handle);
                int     UserID = int.Parse(dw["UserID"].ToString());

                UM_UserInfo UserInfo = UserInfoBLL.GetModel(UserID);
                managerEdit.UserInfo = UserInfo;

                UM_ManagerBeloneToGroupBLL ManagerBeloneToGroupBLL = new UM_ManagerBeloneToGroupBLL();
                UM_ManagerBeloneToGroup    ManagerBeloneToGroup    = ManagerBeloneToGroupBLL.GetModel(UserID);
                managerEdit.RightGroupID = (int)ManagerBeloneToGroup.ManagerGroupID;
                if (managerEdit.ShowDialog(this) == DialogResult.OK)
                {
                    LoadManagerList();
                    this.ViewManage.FocusedRowHandle = handle;
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("修改管理员失败!");
                string      errCode   = "GL-1005";
                string      errMsg    = "修改管理员异常!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
 /// <summary>
 /// 加载权限组列表
 /// </summary>
 private void LoadRightGroup()
 {
     try
     {
         ManagerGroupBLL = new UM_ManagerGroupBLL();
         DataSet ds = ManagerGroupBLL.GetPagingManagerGroup(strwhere, this.m_pageNo, this.m_pageSize,
                                                            out this.m_rowCount);
         DataTable RightGroup;
         if (ds == null || ds.Tables[0].Rows.Count == 0)
         {
             RightGroup = new DataTable();
             if (!isFirstInit)
             {
                 ShowMessageBox.ShowInformation("不存在记录!");
             }
         }
         else
         {
             RightGroup = ds.Tables[0];
         }
         this.gridRightGroup.DataSource = RightGroup;
     }
     catch (Exception ex)
     {
         //写日志
         string      errCode   = "GL-1202";
         string      errMsg    = "加载权限组列表失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         throw exception;
     }
     isFirstInit = false;
 }
Ejemplo n.º 5
0
 private void btn_ok_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.txt_LoginName.Text == string.Empty)
         {
             ShowMessageBox.ShowInformation("请输入登录名称!");
             return;
         }
         if (this.txt_Answer.Text == string.Empty)
         {
             ShowMessageBox.ShowInformation("请输入提示问题的答案!");
             return;
         }
         int            QuestionID  = ((UComboItem)this.dll_QuestionID.SelectedItem).ValueIndex;
         UM_UserInfoBLL UserInfoBLL = new UM_UserInfoBLL();
         UM_UserInfo    UserInfo    = UserInfoBLL.SeekForPassword(this.txt_LoginName.Text, this.txt_Answer.Text, QuestionID);
         if (UserInfo == null)
         {
             ShowMessageBox.ShowInformation("验证失败,请重新输入!");
             return;
         }
         ShowMessageBox.ShowInformation(string.Format("你的登录密码为:{0}", UtilityClass.DesDecrypt(UserInfo.Password.ToString(), string.Empty)));
     }
     catch (Exception)
     {
         return;
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 加载管理员列表
 /// </summary>
 private void LoadManagerList()
 {
     try
     {
         DataSet ds = UserInfoBLL.GetPagingManager(managerQueryEntity, this.m_pageNo, this.m_pageSize,
                                                   out this.m_rowCount);
         DataTable Managerdt;
         if (ds == null || ds.Tables[0].Rows.Count == 0)
         {
             Managerdt = new DataTable();
             if (!isFirstInit)
             {
                 ShowMessageBox.ShowInformation("不存在记录!");
             }
         }
         else
         {
             Managerdt = ds.Tables[0];
         }
         this.gridManage.DataSource = Managerdt;
     }
     catch (Exception ex)
     {
         //写日志
         string      errCode   = "GL-1002";
         string      errMsg    = "加载管理员列表失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         throw exception;
     }
     isFirstInit = false;
 }
Ejemplo n.º 7
0
 private void btn_OK_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckInput())
         {
             GetEntity();
             var CounterBLL = new CT_CounterBLL();
             if (EditType == 1)
             {
                 CounterBLL.Add(m_counter);
                 ShowMessageBox.ShowInformation("添加成功!");
                 DialogResult = DialogResult.OK;
                 Close();
             }
             else
             {
                 CounterBLL.Update(m_counter);
                 ShowMessageBox.ShowInformation("修改成功!");
                 DialogResult = DialogResult.OK;
                 Close();
             }
         }
     }
     catch (Exception ex)
     {
         ShowMessageBox.ShowInformation("编辑失败!");
         string errCode   = "GL-3032";
         string errMsg    = "编辑保存失败!";
         var    exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UserInfoForm_Load(object sender, EventArgs e)
 {
     try
     {
         if (m_EditType == 1)
         {
             m_InitFund    = new InitFund();
             m_currentUser = new UM_UserInfo();
         }
         SetControlsIsEnabled();
         BinData();
         InitTreeView();
         if (m_EditType == 2)
         {
             InitUserInfo();
             InitOriginationFund();
         }
         if (this.dll_CouterID.Properties.Items.Count < 1)
         {
             ShowMessageBox.ShowInformation("请先添加柜台信息!");
         }
     }
     catch (Exception ex)
     {
         string      errCode = "GL-0300";
         string      errMsg  = "交易员信息页面加载失败。";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         ShowMessageBox.ShowInformation(vte.ToString());
     }
 }
Ejemplo n.º 9
0
        /// <summary>
        /// 加载用户列表
        /// </summary>
        private void LoadUser()
        {
            try
            {
                DataSet ds = UserInfoBLL.GetPagingUser(QueryUserInfo, this.m_pageNo, this.m_pageSize,
                                                       out this.m_rowCount);
                DataTable allUser;
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    allUser = new DataTable();
                    if (!isFirstInit)
                    {
                        ShowMessageBox.ShowInformation("不存在记录!");
                    }
                }
                else
                {
                    allUser = ds.Tables[0];
                }
                ddlCertificateStyle.DataSource    = CommonClass.ComboBoxDataSource.GetCertificateStyleList();
                ddlCertificateStyle.ValueMember   = "ValueIndex";
                ddlCertificateStyle.DisplayMember = "TextTitleValue";

                this.gridUser.DataSource = allUser;
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-0323";
                string      errMsg    = "加载用户列表失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), ex);
            }
            isFirstInit = false;
        }
 /// <summary>
 /// 修改期货交易规则
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnModify_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.gdvFuturesTradeRulesSelect != null && this.gdvFuturesTradeRulesSelect.DataSource != null &&
             this.gdvFuturesTradeRulesSelect.RowCount > 0 &&
             this.gdvFuturesTradeRulesSelect.FocusedRowHandle >= 0)
         {
             m_CurRow = this.gdvFuturesTradeRulesSelect.FocusedRowHandle;
             if (m_CurRow != AppGlobalVariable.INIT_INT)
             {
                 this.UpdateFuturesTradeRules(m_CurRow);
             }
         }
         else
         {
             ShowMessageBox.ShowInformation("请选择记录!");
         }
         this.QueryFuturesTradeRules();
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-5822";
         string      errMsg    = "修改期货交易规则失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }
 /// <summary>
 /// 加载追加资金历史列表
 /// </summary>
 private void LoadFundList()
 {
     try
     {
         DataSet ds = FundAddInfoBLL.GetPagingFund(fundAddQueryEntity, this.m_pageNo, this.m_pageSize,
                                                   out this.m_rowCount);
         DataTable Funddt;
         if (ds == null || ds.Tables[0].Rows.Count == 0)
         {
             Funddt = new DataTable();
             if (!isFirstInit)
             {
                 ShowMessageBox.ShowInformation("不存在记录!");
             }
         }
         else
         {
             Funddt = ds.Tables[0];
         }
         this.gridFund.DataSource = Funddt;
     }
     catch (Exception ex)
     {
         //写日志
         ShowMessageBox.ShowInformation("加载历史列表失败");
         string      errCode   = "GL-0343";
         string      errMsg    = "加载历史列表失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), ex);
     }
     isFirstInit = false;
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 设置查询实体对象
        /// </summary>
        private bool SetManagerQueryEntity()
        {
            if (managerQueryEntity == null)
            {
                managerQueryEntity = new ManagerQueryEntity();
            }
            if (this.txt_UserID.Text.Trim() == string.Empty)
            {
                managerQueryEntity.UserID = int.MaxValue;
            }
            else
            {
                if (InputTest.intTest(this.txt_UserID.Text.Trim()))
                {
                    managerQueryEntity.UserID = int.Parse(this.txt_UserID.Text.Trim());
                }
                else
                {
                    ShowMessageBox.ShowInformation("请输入正确的交易员编号!");
                    return(false);
                }
            }
            managerQueryEntity.LoginName = this.txt_LoginName.Text.Trim() != string.Empty
                                               ? this.txt_LoginName.Text.Trim()
                                               : string.Empty;

            managerQueryEntity.ManagerGroupName = this.txt_rightgroupname.Text.Trim() != string.Empty
                                                      ? this.txt_rightgroupname.Text.Trim()
                                                      : string.Empty;

            managerQueryEntity.ManagerGroupID = int.MaxValue;
            managerQueryEntity.UserName       = string.Empty;
            managerQueryEntity.RoleID         = (int)Types.RoleTypeEnum.Manager;
            return(true);
        }
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Bourse_Machine_Load(object sender, EventArgs e)
        {
            try
            {
                ManagementCenter.BLL.CM_BourseTypeBLL BourseTypeBLL = new CM_BourseTypeBLL();

                string strWhere = "  DELETESTATE IS NOT NULL AND DELETESTATE<>1 ";
                ds = BourseTypeBLL.GetList(strWhere);

                ds.Tables[0].Columns.Add("MachineNo");
                this.gridControl1.DataSource = ds.Tables[0];

                this.gridControl1.Focus();
                this.gridView1.FocusedColumn = this.gridCol_MachineNo;
                SendKeys.Send("{ENTER}");
                this.gridControl1.Refresh();
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("页面加载失败!");
                string      errCode = "GL-2052";
                string      errMsg  = "页面加载失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
            }
        }
        /// <summary>
        /// 显示添加熔断_时间段标识UI
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddFuseTimesection_Click(object sender, EventArgs e)
        {
            try
            {
                FuseTimesectionManageUI fuseTimesectionManageUI = new FuseTimesectionManageUI();

                if (m_CommodityCode != AppGlobalVariable.INIT_STRING)
                {
                    fuseTimesectionManageUI.m_CommodityCode = m_CommodityCode;
                    fuseTimesectionManageUI.ShowDialog();
                }
                else
                {
                    ShowMessageBox.ShowInformation("请选中记录!");
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-6804";
                string      errMsg    = "显示添加熔断_时间段标识UI失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
 /// <summary>
 /// 本月,下月,随后的两个季度月份复选框的 checkEdit13_CheckedChanged事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void checkEdit13_CheckedChanged(object sender, EventArgs e)
 {
     try
     {
         foreach (Control t in this.panelControl1.Controls)
         {
             if (t is DevExpress.XtraEditors.CheckEdit)
             {
                 DevExpress.XtraEditors.CheckEdit checkEdit = (DevExpress.XtraEditors.CheckEdit)t;
                 if (checkEdit.Checked && checkEdit.Name == "checkEdit13")
                 {
                     ShowMessageBox.ShowInformation("此月份不能与其它月份同时选择!");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-5872";
         string      errMsg    = "本月,下月,随后的两个季度月份复选框的事件失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }
 /// <summary>
 /// 确定按钮事件 btn_OK_Click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_OK_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.txt_LoginName.Text == string.Empty)
         {
             ShowMessageBox.ShowInformation("登陆名称不能为空!");
             return;
         }
         if (this.txt_PassWord.Text == string.Empty)
         {
             ShowMessageBox.ShowInformation("密码不能为空!");
             return;
         }
         UM_UserInfoBLL UserInfoBLL = new UM_UserInfoBLL();
         UM_UserInfo    UserInfo    = UserInfoBLL.ManagerLoginConfirm(this.txt_LoginName.Text, UtilityClass.DesEncrypt(this.txt_PassWord.Text, string.Empty),
                                                                      (int)Types.AddTpyeEnum.BackManager);
         if (UserInfo != null)
         {
             ParameterSetting.Mananger = UserInfo;
             DialogResult = DialogResult.OK;
             this.Close();
         }
         else
         {
             ShowMessageBox.ShowInformation("用户名或密码错误,请重新输入!");
         }
     }
     catch (Exception ex)
     {
         ShowMessageBox.ShowInformation(ex.Message.ToString());
         return;
     }
     this.txt_LoginName.Focus();
 }
Ejemplo n.º 17
0
        //================================  私有  方法 ================================

        #region 设置查询实体对象

        /// <summary>
        /// 设置查询实体对象
        /// </summary>
        private bool SetQueryUserInfo()
        {
            if (QueryUserInfo == null)
            {
                QueryUserInfo = new UM_UserInfo();
            }
            if (this.txt_UserID.Text.Trim() == string.Empty)
            {
                QueryUserInfo.UserID = int.MaxValue;
            }
            else
            {
                if (InputTest.intTest(this.txt_UserID.Text.Trim()))
                {
                    QueryUserInfo.UserID = int.Parse(this.txt_UserID.Text.Trim());
                }
                else
                {
                    ShowMessageBox.ShowInformation("请输入正确的交易员编号!");
                    return(false);
                }
            }

            QueryUserInfo.LoginName = string.Empty;
            QueryUserInfo.RoleID    = (int)Types.RoleTypeEnum.Transaction;
            return(true);
        }
Ejemplo n.º 18
0
        //================================  事件 ================================

        #region  转账管理窗体 TransferManageUI_Load
        /// <summary>
        /// 转账管理窗体 TransferManageUI_Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TransferManageUI_Load(object sender, EventArgs e)
        {
            try
            {
                AccountTypeBLL = new UM_AccountTypeBLL();
                //L_AccountType = AccountTypeBLL.GetListArray(string.Empty);
                DealerAccountBLL = new UM_DealerAccountBLL();
                SetQueryUserInfo();
                InitUserList();

                //转出账户类型
                cmbTransOut.Properties.Items.Clear();
                cmbTransOut.Properties.Items.AddRange(ComboBoxDataSource.GetAccountTypeList());
                cmbTransOut.SelectedIndex = 0;

                //转入账户类型(默认显示不包含银行资金账户)
                cmbTransIn.Properties.Items.Clear();
                cmbTransIn.Properties.Items.AddRange(ComboBoxDataSource.GetAccountTypeListByAccountTypeID((int)GTA.VTS.Common.CommonObject.Types.AccountType.BankAccount));
                cmbTransIn.SelectedIndex = 0;

                //币种类型
                cmbCurrencyType.Properties.Items.Clear();
                cmbCurrencyType.Properties.Items.AddRange(ComboBoxDataSource.GetCurrencyTypeList());
                cmbCurrencyType.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("窗体加载失败!");
                string      errCode   = "GL-0371";
                string      errMsg    = "转账管理窗体加载失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), ex);
            }
        }
Ejemplo n.º 19
0
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ManagerEdit_Load(object sender, EventArgs e)
 {
     try
     {
         if (m_EditType == 1)
         {
             m_userInfo = new UM_UserInfo();
         }
         BinData();
         SetControl();
         if (m_EditType == 2)
         {
             if (ispersonedit)
             {
                 this.Text = "个人信息";
                 this.Icon = Icon.FromHandle(new Bitmap(imageList1.Images[0]).GetHicon());
                 if ((int)UserInfo.RoleID != (int)Types.RoleTypeEnum.Admin)
                 {
                     GetRightGroupByUserID(UserInfo.UserID);
                 }
             }
             InitManagerInfo();
         }
     }
     catch (Exception ex)
     {
         //写日志
         ShowMessageBox.ShowInformation("页面加载失败!");
         string      errCode   = "GL-1021";
         string      errMsg    = "页面加载失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
     }
 }
Ejemplo n.º 20
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;
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 确定按纽
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_ok_Click(object sender, EventArgs e)
        {
            try
            {
                ManagementCenter.BLL.UM_UserInfoBLL UserInfoBLL = new UM_UserInfoBLL();

                if (this.m_EditType == 1)
                {
                    if (CheckUserInfo())
                    {
                        if (UserInfoBLL.ManagerAdd(m_userInfo, m_rightGroupID))
                        {
                            ShowMessageBox.ShowInformation("添加成功!");
                            this.DialogResult = DialogResult.OK;
                            this.Close();
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("添加失败!");
                        }
                    }
                }
                else
                {
                    if (this.m_userInfo.AddType == (int)ManagementCenter.Model.CommonClass.Types.AddTpyeEnum.FrontManager)
                    {
                        ShowMessageBox.ShowInformation("此用户为前台管理员,不允许修改!");
                        return;
                    }
                    if (CheckUserInfo())
                    {
                        if (UserInfoBLL.ManagerUpdate(m_userInfo, m_rightGroupID))
                        {
                            if (ispersonedit)
                            {
                                CommonClass.ParameterSetting.Mananger = UserInfo;
                            }
                            ShowMessageBox.ShowInformation("修改成功!");
                            this.DialogResult = DialogResult.OK;
                            this.Close();
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("修改失败!");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-1023";
                string      errMsg    = "确定事件异常!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 检测输入
        /// </summary>
        /// <returns></returns>
        public bool CheckInPut()
        {
            try
            {
                if (MatchCenter == null)
                {
                    MatchCenter = new RC_MatchCenter();
                }

                if (this.txt_CenterName.Text == string.Empty)
                {
                    ShowMessageBox.ShowInformation("请输入撮合中心名称!");
                    return(false);
                }
                MatchCenter.MatchCenterName = this.txt_CenterName.Text;
                if (this.txt_CenterIP.Text == string.Empty)
                {
                    ShowMessageBox.ShowInformation("请输入IP地址!");
                    return(false);
                }
                if (!InputTest.IPTest(this.txt_CenterIP.Text.Trim()))
                {
                    ShowMessageBox.ShowInformation("IP地址,输入有误,请重新输入!");
                    return(false);
                }
                MatchCenter.IP = this.txt_CenterIP.Text;
                if (!InputTest.intTest(this.txt_Port.Text))
                {
                    ShowMessageBox.ShowInformation("端口输入有误,请重新输入!");
                    return(false);
                }
                MatchCenter.Port = int.Parse(this.txt_Port.Text);
                if (this.txt_cuoheService.Text == string.Empty)
                {
                    ShowMessageBox.ShowInformation("请输入撮合服务的名称!");
                    return(false);
                }
                MatchCenter.CuoHeService = this.txt_cuoheService.Text;
                if (this.txt_xiadanService.Text == string.Empty)
                {
                    ShowMessageBox.ShowInformation("请输入下单服务的名称!");
                    return(false);
                }
                MatchCenter.XiaDanService = this.txt_xiadanService.Text;
                return(true);
            }
            catch (Exception ex)
            {
                string      errCode = "GL-2004";
                string      errMsg  = "检测输入失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
                return(false);
            }
        }
 /// <summary>
 /// 修改按纽事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Update_Click(object sender, EventArgs e)
 {
     if (this.ViewRightGroup != null && this.ViewRightGroup.FocusedRowHandle >= 0)
     {
         m_cutRow = this.ViewRightGroup.FocusedRowHandle;
         RightGroupUpdate(m_cutRow);
     }
     else
     {
         ShowMessageBox.ShowInformation("请选中记录行");
     }
 }
Ejemplo n.º 25
0
 /// <summary>
 /// 修改按纽事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Btn_Update_Click(object sender, EventArgs e)
 {
     if (this.ViewUser != null && this.ViewUser.FocusedRowHandle >= 0)
     {
         m_cutRow = this.ViewUser.FocusedRowHandle;
         UserUpdate(m_cutRow);
     }
     else
     {
         ShowMessageBox.ShowInformation("请选中记录行!");
     }
 }
        private void btn_OK_Click(object sender, EventArgs e)
        {
            try
            {
                List <RC_TradeCommodityAssign> ladd = new List <RC_TradeCommodityAssign>();
                List <RC_TradeCommodityAssign> ldel = new List <RC_TradeCommodityAssign>();

                RC_TradeCommodityAssign TradeCommodityAssign;

                foreach (object obj in listReconce.Items)
                {
                    UComboItemCode item = (UComboItemCode)obj;
                    if (item.Start_HasRight == false && item.End_Hasright == true)
                    {
                        TradeCommodityAssign = new RC_TradeCommodityAssign();
                        TradeCommodityAssign.CommodityCode  = item.ValueStr;
                        TradeCommodityAssign.CodeFormSource = item.CodeFormSource;
                        ladd.Add(TradeCommodityAssign);
                    }
                }
                foreach (object obj in listCanUse.Items)
                {
                    UComboItemCode item = (UComboItemCode)obj;
                    if (item.Start_HasRight == true && item.End_Hasright == false)
                    {
                        TradeCommodityAssign = new RC_TradeCommodityAssign();
                        TradeCommodityAssign.CommodityCode = item.ValueStr;
                        ldel.Add(TradeCommodityAssign);
                    }
                }

                ManagementCenter.BLL.RC_TradeCommodityAssignBLL TradeCommodityAssignBLL =
                    new RC_TradeCommodityAssignBLL();
                if (TradeCommodityAssignBLL.Update(matchMachine.MatchMachineID, ladd, ldel))
                {
                    ShowMessageBox.ShowInformation("保存成功!");
                    this.Close();
                }
                else
                {
                    ShowMessageBox.ShowInformation("保存失败!");
                }
            }
            catch (Exception ex)
            {
                ShowMessageBox.ShowInformation("保存失败!");
                string      errCode = "GL-2032";
                string      errMsg  = "保存失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 加载权限组列表
        /// </summary>
        private void LoadMachineList()
        {
            try
            {
                DataSet ds = MatchMachineBLL.GetPagingMachine(matchMachineQueryEntity, this.m_pageNo, this.m_pageSize,
                                                              out this.m_rowCount);
                DataTable Machinedt;
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    Machinedt = new DataTable();
                    if (!isFirstInit)
                    {
                        ShowMessageBox.ShowInformation("不存在记录!");
                    }
                }
                else
                {
                    Machinedt = ds.Tables[0];
                }

                //绑定撮合中心_撮合机表中的交易所类型ID对应的交易所类型名称
                ddlBourseTypeID.DataSource  = MatchMachineBLL.GetRCMatchMachineBourseTypeName().Tables[0];
                ddlBourseTypeID.ValueMember =
                    MatchMachineBLL.GetRCMatchMachineBourseTypeName().Tables[0].Columns["BourseTypeID"].
                    ToString();
                ddlBourseTypeID.DisplayMember =
                    MatchMachineBLL.GetRCMatchMachineBourseTypeName().Tables[0].Columns["BourseTypeName"].
                    ToString();


                //绑定撮合中心_撮合机表中的撮合中心ID对应的撮合中心名称
                ddlMatchCenterID.DataSource  = MatchMachineBLL.GetRCMatchMachineMatchCenterName().Tables[0];
                ddlMatchCenterID.ValueMember =
                    MatchMachineBLL.GetRCMatchMachineMatchCenterName().Tables[0].Columns["MatchCenterID"].
                    ToString();
                ddlMatchCenterID.DisplayMember =
                    MatchMachineBLL.GetRCMatchMachineMatchCenterName().Tables[0].Columns["MatchCenterName"].
                    ToString();

                this.gridMachine.DataSource = Machinedt;
            }
            catch (Exception ex)
            {
                //写日志
                string      errCode = "GL-2018";
                string      errMsg  = "加载撮合机列表失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
                throw;
            }
            isFirstInit = false;
        }
 /// <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);
     }
 }
        /// <summary>
        /// 设置查询实体对象
        /// </summary>
        private bool SetQueryUserInfo()
        {
            if (QueryUserInfo == null)
            {
                QueryUserInfo = new UM_UserInfo();
            }
            if (this.txt_UserID.Text.Trim() == string.Empty)
            {
                QueryUserInfo.UserID = int.MaxValue;
            }
            else
            {
                if (InputTest.intTest(this.txt_UserID.Text.Trim()))
                {
                    QueryUserInfo.UserID = int.Parse(this.txt_UserID.Text.Trim());
                }
                else
                {
                    ShowMessageBox.ShowInformation("请输入正确的交易员编号!");
                    return(false);
                }
            }

            QueryUserInfo.UserName = this.txt_Name.Text.Trim() != string.Empty
                                         ? this.txt_Name.Text.Trim()
                                         : string.Empty;

            //if (this.txt_CounterID.Text.Trim() == string.Empty)
            //{
            //    QueryUserInfo.CouterID = int.MaxValue;
            //}
            //else
            //{
            //    if (InputTest.intTest(this.txt_CounterID.Text.Trim()))
            //    {
            //        QueryUserInfo.CouterID = int.Parse(this.txt_CounterID.Text.Trim());
            //    }
            //    else
            //    {
            //        ShowMessageBox.ShowInformation("请输入正确的柜台编号!");
            //        return false;
            //    }
            //}
            //柜台名称
            QueryUserInfo.Name = this.txt_CounterName.Text.Trim() != string.Empty
                                         ? this.txt_CounterName.Text.Trim()
                                         : string.Empty;
            QueryUserInfo.LoginName = string.Empty;
            QueryUserInfo.RoleID    = (int)Types.RoleTypeEnum.Transaction;
            return(true);
        }
        /// <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;
            }
        }