Exemplo n.º 1
0
        public ActionResult GetSpecialDays()
        {
            var model = new SystemViewModels.SystemViewModel();

            try
            {
                var specialdaysList = _portalAdminService.HamtaAllaSpecialdagar();
                model.SpecialDays = ConvertAdmSpecialdagToViewModel(specialdaysList.ToList());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                ErrorManager.WriteToErrorLog("SystemController", "GetSpecialDays", e.ToString(), e.HResult, User.Identity.Name);
                var errorModel = new CustomErrorPageModel
                {
                    Information  = "Ett fel inträffade vid hämtning av specialdagar.",
                    ContactEmail = ConfigurationManager.AppSettings["ContactEmail"],
                };
                return(View("CustomError", errorModel));
            }
            return(View("EditSpecialDays", model));
        }