Esempio n. 1
0
 public ActionResult DeleteSpecialDay(int specialDayId)
 {
     try
     {
         _portalAdminService.TaBortSpecialdag(specialDayId);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         ErrorManager.WriteToErrorLog("SystemController", "DeleteSpecialDay", e.ToString(), e.HResult, User.Identity.Name);
         var errorModel = new CustomErrorPageModel
         {
             Information  = "Ett fel inträffade när information om specialdag skulle tas bort.",
             ContactEmail = ConfigurationManager.AppSettings["ContactEmail"],
         };
         return(View("CustomError", errorModel));
     }
     return(RedirectToAction("GetSpecialDays"));
 }