Пример #1
0
 public IEnumerable <AuthenticationLibrary.Model.UserRole> GetUsersByRoleId(int roleId)
 {
     try
     {
         DLL.UserRole obj = new DLL.UserRole();
         return(obj.GetUsersByRoleId(roleId));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Пример #2
0
 public string[] GetUserRoles(string userName)
 {
     try
     {
         DLL.UserRole obj = new DLL.UserRole();
         return(obj.GetUserRoles(userName));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Пример #3
0
 public bool Insert(AuthenticationLibrary.Model.User user, AuthenticationLibrary.Model.Role role)
 {
     try
     {
         if (user != null && role != null)
         {
             DLL.UserRole userRole = new DLL.UserRole();
             return(userRole.Insert(user, role));
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
 }