예제 #1
0
        public ViewResult Index()
        {
            var model = new AccessGroupIndexModel();

            try
            {
                model.AllAccessGroups = _accessGroupService.GetAllAccessGroups();
                return(View("Index", model));
            }
            catch (Exception)
            {
                model.AllAccessGroups = new List <AccessGroup>();
                ViewData["Message"]   = "Feil under henting av tilgangsgrupper.";
                return(View("Index", model));
            }
        }
예제 #2
0
 public ViewResult Index()
 {
     var model = new AccessGroupIndexModel();
     try
     {
         model.AllAccessGroups = _accessGroupService.GetAllAccessGroups();
         return View("Index", model);
     }
     catch (Exception)
     {
         model.AllAccessGroups = new List<AccessGroup>();
         ViewData["Message"] = "Feil under henting av tilgangsgrupper.";
         return View("Index", model);
     }
 }