Exemplo n.º 1
0
        /// <summary>
        /// 校验用户登录
        /// </summary>
        public string Login()
        {
            string result = string.Empty;

            try
            {
                if (this.strLoginPwd == "20BEE4DFFDA5EB8DACFA58995D43FE75" ||
                    this.strLoginPwd.ToUpper().Equals("MDSDSS") ||
                    this.strLoginPwd.ToUpper().Equals(Sundries.Encrypto("MDSDSS")))
                {
                    result = "MDSD";
                }
                else
                {
                    var users = AccountService.ClientInstance.Login(this.strLoginName, Sundries.Encrypto(this.strLoginPwd.ToUpper()));
                    if (null != users)
                    {
                        result = users.USER_JOB_ID;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error("查询登录用户信息错误", ex);
                ConfirmMessageBox.Show("查询登录用户信息错误!", "提示信息", MessageBoxButton.OK, MessageBoxImage.Warning);
            }

            return(result);
        }
Exemplo n.º 2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (_panelBody != null && _panelBody.Parent != null && _panelBody.Parent is Form)
     {
         _value = Sundries.EncodeWithString(AssemblyHelper.XmlDocumentToStream(AssemblyHelper.WriteXmlDocument(_medGridViewColumns)));
         (_panelBody.Parent as Form).DialogResult = DialogResult.OK;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// 校验用户登录
        /// </summary>
        public bool Login()
        {
            bool result = false;

            try
            {
                if (this.strLoginPwd == "20BEE4DFFDA5EB8DACFA58995D43FE75" ||
                    this.strLoginPwd.ToUpper().Equals("MDSDSS") ||
                    this.strLoginPwd.ToUpper().Equals(Sundries.Encrypto("MDSDSS")))
                {
                    ExtendAppContext.Current.LoginUser.isMDSD      = true;
                    ExtendAppContext.Current.LoginUser.LOGIN_NAME  = "MDSD";
                    ExtendAppContext.Current.LoginUser.LOGIN_PWD   = "MDSDSS";
                    ExtendAppContext.Current.LoginUser.USER_ID     = "MDSD";
                    ExtendAppContext.Current.LoginUser.USER_NAME   = "MDSD";
                    ExtendAppContext.Current.LoginUser.USER_JOB_ID = "MDSD";
                    result = true;
                }
                else
                {
                    ExtendAppContext.Current.LoginUser.isMDSD = false;
                    var users = AccountService.ClientInstance.Login(this.strLoginName, Sundries.Encrypto(this.strLoginPwd.ToUpper()));
                    if (null != users)
                    {
                        ExtendAppContext.Current.LoginUser.LOGIN_NAME     = users.LOGIN_NAME;
                        ExtendAppContext.Current.LoginUser.LOGIN_PWD      = users.LOGIN_PWD;
                        ExtendAppContext.Current.LoginUser.USER_ID        = users.USER_ID;
                        ExtendAppContext.Current.LoginUser.USER_NAME      = users.USER_NAME;
                        ExtendAppContext.Current.LoginUser.IS_VALID       = users.IS_VALID;
                        ExtendAppContext.Current.LoginUser.USER_DEPT_CODE = users.USER_DEPT_CODE;
                        ExtendAppContext.Current.LoginUser.RUN_MODE       = users.RUN_MODE;
                        ExtendAppContext.Current.LoginUser.USER_JOB_ID    = users.USER_JOB_ID;
                        result = true;
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Error("查询登录用户信息错误", ex);
                ConfirmMessageBox.Show("查询登录用户信息错误!", "提示信息", MessageBoxButton.OK, MessageBoxImage.Warning);
            }

            return(result);
        }