public MessageSessionResponse DeleteWithId(string language, string sessionId, object id) { AppUser admin = this.LoadUserWithSessionId(sessionId); ValidateSessionAndRight(language, admin, EnumData.AppModules.AppUser.ToString(), new List <string> { EnumData.RoleRight.all.ToString(), EnumData.RoleRight.account.ToString() }); string errorMessageKey = ""; try { errorMessageKey = ConstentMessages.UserNotExist; _work.DeleteUserWithId(id.ToString()); this.UpdateAdminSession(admin); return(new MessageSessionResponse { Message = "OK", SessionId = admin.Session.Id, SessionUpdateTs = admin.Session.UpdateTs.ToJsTime() }); } catch (Exception ex) { throw new TranslationException(_translator, language, errorMessageKey, ex); } }