Exemple #1
0
        //================================  私有  方法 ================================

        #region 获取港股品种名称 GetBindHKBreedClassName

        /// <summary>
        /// 获取港股品种名称
        /// </summary>
        private void GetBindHKBreedClassName()
        {
            try
            {
                string     strWhere = " BreedClassTypeID=4 and DeleteState is not null and DeleteState<>1 ";
                DataSet    ds       = CommonParameterSetCommon.GetList(strWhere); //从交易商品品种表中获取品种类型是港股的品种名称
                UComboItem _item;
                if (ds != null && ds.Tables[0].Rows.Count != 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                               Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                        this.cmbBreedClassID.Properties.Items.Add(_item);
                    }
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-7807";
                string      errMsg    = "获取港股品种名称失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
        /// <summary>
        /// 加载权限列表
        /// </summary>
        private void LoadAllRightList()
        {
            try
            {
                List <UM_Functions> l_Functions = FunctionsBLL.GetListArray(string.Empty);
                UComboItem          item;
                this.listBoxAllRight.Items.Clear();
                foreach (UM_Functions Functions in l_Functions)
                {
                    item = new UComboItem(Functions.FunctionName, Functions.FunctionID);
                    this.listBoxAllRight.Items.Add(item);
                }
                if (EditType == 2)
                {
                    List <UM_ManagerGroupFunctions> l_ManagerGroupFunctions =
                        ManagerGroupFunctionsBLL.GetListArray(string.Format(" ManagerGroupID={0}", managergroup.ManagerGroupID));

                    foreach (UM_ManagerGroupFunctions ManagerGroupFunctions in l_ManagerGroupFunctions)
                    {
                        item = new UComboItem(ManagerGroupFunctions.FunctionName, (int)ManagerGroupFunctions.FunctionID);
                        this.listBoxHasRight.Items.Add(item);
                    }
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-1223";
                string      errMsg    = "加载权限列表失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }
        //================================  私有  方法 ================================

        #region 获取期货品种名称 GetBindBreedClassName

        /// <summary>
        /// 获取期货品种名称
        /// </summary>
        private void GetBindBreedClassName()
        {
            try
            {
                DataSet ds = FuturesManageCommon.GetQHBreedClassNameByBreedClassID(); //从交易商品品种表中获取
                if (ds != null)
                {
                    UComboItem _item;
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                               Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                        this.cmbBreedClassID.Properties.Items.Add(_item);
                    }
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-5873";
                string      errMsg    = "获取期货品种名称失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
Exemple #4
0
 /// <summary>
 /// 获取品种类型是股指期货的品种名称
 /// </summary>
 private void GetBindQHSIFPositionBailBCName()
 {
     try
     {
         DataSet ds = CommonParameterSetCommon.GetQHSIFPositionAndBailBreedClassName(); //从交易商品品种表中获取
         if (ds != null)
         {
             UComboItem _item;
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                        Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                 this.cmbBreedClassID.Properties.Items.Add(_item);
             }
         }
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-6486";
         string      errMsg    = "获取品种类型是股指期货的品种名称失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return;
     }
 }
        /// <summary>
        /// 获取交易所类型名称
        /// </summary>
        private void GetBindBourseTypeName()
        {
            DataSet    ds = CommonParameterSetCommon.GetBourseTypeName(); //从交易所类型中获取
            UComboItem _item;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                _item = new UComboItem(ds.Tables[0].Rows[i]["BourseTypeName"].ToString(),
                                       Convert.ToInt32(ds.Tables[0].Rows[i]["BourseTypeID"]));
                this.cmbBourseTypeID.Properties.Items.Add(_item);
            }
        }
        //================================  私有  方法 ================================

        #region 获取现货品种名称 GetBindBreedClassName

        /// <summary>
        /// 获取现货品种名称
        /// </summary>
        private void GetBindBreedClassName()
        {
            DataSet    ds = SpotManageCommon.GetBreedClassName(); //从交易商品品种表中获取
            UComboItem _item;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                       Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                this.cmbBreedClassID.Properties.Items.Add(_item);
            }
        }
Exemple #7
0
        /// <summary>
        /// 获取查询品种名称
        /// </summary>
        private void GetBindQueryBreedClassName()
        {
            DataSet    ds = CommonParameterSetCommon.GetAllBreedClassName(); //从交易商品品种中获取
            UComboItem _item;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                       Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));

                //绑定查询条件品种标识(品种名称)
                this.cmbBreedClassIDQ.Properties.Items.Add(_item);
            }
        }
Exemple #8
0
        /// <summary>
        /// 获取品种名称
        /// </summary>
        private void GetBindBreedClassName()
        {
            string     strWhere = " BreedClassTypeID<>4  and DeleteState<>1 ";
            DataSet    ds       = CommonParameterSetCommon.GetList(strWhere);//从交易商品品种中获取
            UComboItem _item;

            if (ds != null && ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                           Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                    this.cmbBreedClassID.Properties.Items.Add(_item);
                }
            }
        }
        //================================  私有  方法 ================================

        #region 获取现货品种名称 GetBindBreedClassName

        /// <summary>
        /// 获取现货品种名称
        /// </summary>
        private void GetBindBreedClassName()
        {
            DataSet    ds = CommonParameterSetCommon.GetXHAndHKBreedClassName(); //获取现货普通和港股品种名称   //SpotManageCommon.GetBreedClassName(); //从交易商品品种表中获取
            UComboItem _item;
            int        _BreedClassID = 46;                                       //未分配品种ID=46,固定值

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                       Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                //this.cmbBreedClassID.Properties.Items.Add(_item);
                if (_BreedClassID != Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]))
                {
                    this.cmbBreedClassID.Properties.Items.Add(_item);
                }
            }
        }
Exemple #10
0
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void LookBackPwd_Load(object sender, EventArgs e)
 {
     try
     {
         this.dll_QuestionID.Properties.Items.Clear();
         UComboItem             item;
         List <UM_QuestionType> L_QuestionType = GetQuestionTypeList();
         if (L_QuestionType != null)
         {
             foreach (UM_QuestionType QuestionType in L_QuestionType)
             {
                 item = new UComboItem(QuestionType.Content, QuestionType.QuestionID);
                 dll_QuestionID.Properties.Items.Add(item);
             }
             dll_QuestionID.SelectedIndex = 0;
         }
     }
     catch (Exception)
     {
         return;
     }
 }
 /// <summary>
 /// 获取品种类型是商品期货或股指期货的品种名称
 /// </summary>
 private void GetBindQHFutureCostsBreedClassName()
 {
     try
     {
         DataSet ds = CommonParameterSetCommon.GetQHFutureCostsBreedClassName(); //从交易商品品种表中获取
         if (ds != null)
         {
             UComboItem _item;
             for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
             {
                 _item = new UComboItem(ds.Tables[0].Rows[i]["BreedClassName"].ToString(),
                                        Convert.ToInt32(ds.Tables[0].Rows[i]["BreedClassID"]));
                 this.cmbBreedClassID.Properties.Items.Add(_item);
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteError(ex.Message, ex);
         return;
     }
 }
Exemple #12
0
        /// <summary>
        /// 设置下拉框的值
        /// </summary>
        private void SetddlData()
        {
            try
            {
                UComboItem item;
                item = new UComboItem(string.Empty, int.MaxValue);
                ddl_Bourse.Properties.Items.Add(item);
                ddl_Bourse.Properties.Items.Clear();
                ddl_Bourse.Properties.Items.AddRange(CommonClass.ComboBoxDataSource.GetBourseTypeList());

                ddl_BourseType.Properties.Items.AddRange(CommonClass.ComboBoxDataSource.GetBourseTypeList());
                //ddl_Bourse.SelectedIndex = 0;
                ddl_Center.Properties.Items.AddRange(CommonClass.ComboBoxDataSource.GetMatchCenterList());
            }
            catch (Exception ex)
            {
                string      errCode = "GL-2019";
                string      errMsg  = "设置下拉框的值失败";
                VTException vte     = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(vte.ToString(), vte.InnerException);
                throw;
            }
        }
        private void btn_OK_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txt_GroupName.Text == string.Empty)
                {
                    ShowMessageBox.ShowInformation("请输入权限组名称!");
                    return;
                }
                if (EditType == 1)
                {
                    managergroup = new UM_ManagerGroup();
                }

                managergroup.ManagerGroupName = this.txt_GroupName.Text;

                if (this.listBoxHasRight.Items.Count < 1)
                {
                    ShowMessageBox.ShowInformation("请选择权限!");
                    return;
                }

                List <UM_ManagerGroupFunctions> l_ManagerGroupFunctions = new List <UM_ManagerGroupFunctions>();
                UM_ManagerGroupFunctions        ManagerGroupFunction;
                foreach (object obj in listBoxHasRight.Items)
                {
                    UComboItem item = (UComboItem)obj;
                    ManagerGroupFunction            = new UM_ManagerGroupFunctions();
                    ManagerGroupFunction.FunctionID = item.ValueIndex;
                    l_ManagerGroupFunctions.Add(ManagerGroupFunction);
                }
                if (EditType == 1)
                {
                    if (ManagerGroupBLL.Add(managergroup, l_ManagerGroupFunctions))
                    {
                        ShowMessageBox.ShowInformation("添加权限组成功!");
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("添加权限组失败!");
                    }
                }
                else
                {
                    if (ManagerGroupBLL.Update(managergroup, l_ManagerGroupFunctions))
                    {
                        ShowMessageBox.ShowInformation("修改权限组成功!");
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("修改权限组失败!");
                    }
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-1221";
                string      errMsg    = "保存权限组事件失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
            }
        }