Ejemplo n.º 1
0
 public ActionResult DeleteFAQ(int faqId, int faqCatId)
 {
     try
     {
         _portalAdminService.TaBortFAQ(faqId);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         ErrorManager.WriteToErrorLog("SystemController", "DeleteFAQ", e.ToString(), e.HResult, User.Identity.Name);
         var errorModel = new CustomErrorPageModel
         {
             Information  = "Ett fel inträffade när FAQ skulle tas bort.",
             ContactEmail = ConfigurationManager.AppSettings["ContactEmail"],
         };
         return(View("CustomError", errorModel));
     }
     return(RedirectToAction("GetFAQs", new { faqCatId = faqCatId }));
 }