public ActionResult Edit(SedeSelectorModel model) { if ((model.sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX)) == null) { return(Content("-1")); } if (model.Edit()) { return(Json(new JavaScriptSerializer().Serialize(model))); } return(Content("-1")); }
public ActionResult Save(SedeSelectorModel model) { try { if ((model.sesion = SessionDB.start(Request, Response, false, model.db, SESSION_BEHAVIOR.AJAX)) == null) { return(Content("-1")); } model.Save(); } catch (Exception e) { } return(Content("0")); }