Exemple #1
0
 public Response <List <UserGroupViewModel> > GetAllUserGroups()
 {
     try
     {
         var response = _userGroupBusiness.GetAllUserGroups();
         return(response);
     }
     catch (Exception e)
     {
         _logger.Error($"GetAllUserGroups Failed: {e.Message}\n {e.StackTrace}");
         return(new Response <List <UserGroupViewModel> >(false, e.Message, null));
     }
 }
 public AddUserViewModel()
 {
     User          = new User();
     UserGroupList = new List <UserGroup>();
     UserGroupList = ugBAL.GetAllUserGroups();
     //foreach (var name in Enum.GetNames(typeof(User_Group)))
     //{
     //    UserGroup ug = new UserGroup();
     //    ug.GroupID = (int)Enum.Parse(typeof(User_Group), name);
     //    ug.UsrGroup = name;
     //    UserGroupList.Add(ug);
     //}
     Modules = new List <Modules>();
     Modules = mdlb.AllModuleList();
 }
        public ActionResult UserGroupList()
        {
            var data = ugBAL.GetAllUserGroups();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }