Example #1
0
        public ActionBusinessResult DeleteUser(int userId, string modifiedBy)
        {
            var result = UserDA.DeleteUser(userId, modifiedBy);

            if (result > 0)
            {
                this.SetActionSuccess(true);
                AccountManagerBL.AddToAccountForceReLoginCollection(userId);
                ModuleMemoryData.MemoryData.GetCache_represent();
            }

            return(this.SetActionResult(result, KnMessageCode.DeleteUserSuccess));
        }
Example #2
0
        public ActionBusinessResult EditUser(UserInfo userEdit, string GroupId)
        {
            var result = UserDA.EditUser(userEdit, GroupId);

            if (result > 0)
            {
                this.SetActionSuccess(true);
                AccountManagerBL.AddToAccountForceReLoginCollection(userEdit.Id);
                ModuleMemoryData.MemoryData.GetCache_represent();
            }

            return(this.SetActionResult(result, KnMessageCode.EditUserSuccess));
        }
Example #3
0
        public ActionBusinessResult ChangeUserSelfPassword(UserInfo userInfo, string newPassword)
        {
            userInfo.Password   = Encription.EncryptAccountPassword(userInfo.Username, userInfo.Password);
            userInfo.ModifiedBy = userInfo.Username;
            newPassword         = Encription.EncryptAccountPassword(userInfo.Username, newPassword);
            var result = UserDA.ChangeUserPassword(userInfo, newPassword);

            if (result > 0)
            {
                this.SetActionSuccess(true);
                AccountManagerBL.AddToAccountForceReLoginCollection(userInfo.Id);
            }

            return(this.SetActionResult(result, KnMessageCode.ChangePasswordUserSuccess));
        }