Ejemplo n.º 1
0
 // GET: Home/SysExceptions
 public ActionResult SysExceptions()
 {
     List<Models.ExceptionModel> model = null;
     using (Contexts.HomeContext context = new Contexts.HomeContext())
     {
         model = context.GetSysExceptions();
     }
     return View(model);
 }
Ejemplo n.º 2
0
 public JsonResult DeleteSysException(int id = 0)
 {
     try
     {
         using (Contexts.HomeContext context = new Contexts.HomeContext())
         {
             context.DeleteSysException(id);
         }
         return Json(new JsonResponseModel()
         {
             Status = 0,
             Message = "Успешно изтриване."
         }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new JsonResponseModel()
         {
             Status = 1,
             Message = ex.Message
         }, JsonRequestBehavior.AllowGet);
     }
 }