Beispiel #1
0
 public ActionResult Save(MenusModel model)
 {
     try
     {
         model.sesion = SessionDB.start(Request, Response, false, model.db);
         if (model.Save())
         {
             return(Json(new { msg = Notification.Succes("Ficha guardada con exito: " + model.Nombre) }));
         }
         else
         {
             return(Json(new { msg = Notification.Error(" Erro al Guardar ficha: " + model.Nombre) }));
         }
     }
     catch (Exception e)
     {
         return(Json(new { msg = Notification.Error(e.Message) }));
     }
 }
Beispiel #2
0
 public ActionResult Save(MenusModel model)
 {
     try
     {
         model.sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX);
         if (model.sesion == null)
         {
             return(Content(string.Empty));
         }
         if (model.Save())
         {
             return(Json(new { msg = Notification.Succes("Menu guardado con exito: " + model.Nombre) }));
         }
         else
         {
             return(Json(new { msg = Notification.Error("Error al Guardar menu: " + model.Nombre) }));
         }
     }
     catch (Exception e)
     {
         return(Json(new { msg = Notification.Error(e.Message) }));
     }
 }