Exemplo n.º 1
0
        /// <summary>
        /// 修改交易员
        /// </summary>
        /// <param name="handle">当前行</param>
        private void UserUpdate(int handle)
        {
            try
            {
                if (handle < 0)
                {
                    return;
                }
                UserInfoForm userInfoForm = new UserInfoForm();
                userInfoForm.EditType = 2;
                DataRow dw     = ViewUser.GetDataRow(handle);
                int     UserID = int.Parse(dw["UserID"].ToString());

                UM_UserInfo UserInfo = UserInfoBLL.GetModel(UserID);
                userInfoForm.CurrentUser = UserInfo;

                if (userInfoForm.ShowDialog(this) == DialogResult.OK)
                {
                    LoadUser();
                    this.ViewUser.FocusedRowHandle = handle;
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-0324";
                string      errMsg    = "修改交易员失败";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), ex);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 添加交易员
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_Add_Click(object sender, EventArgs e)
        {
            UserInfoForm userInfoForm = new UserInfoForm();

            userInfoForm.EditType = 1;
            if (userInfoForm.ShowDialog(this) == DialogResult.OK)
            {
                //刷新列表
                InitUserList();
            }
        }