public ActionResult Despublicar(GestiondePagosModel model) { if (sesion == null) { sesion = SessionDB.start(Request, Response, false, db); } model.sesion = sesion; /* * if (!sesion.permisos.havePermission(Privileges[0].Permiso)) * return Json(new { msg = Notification.notAccess() }); * //*/ try { if (model.publicar()) { model.init(); Log.write(this, "Publicar", LOG.REGISTRO, "SQL:" + model.sql, sesion); return(Json(new { msg = Notification.Succes("Despublicado(s) con exito ") })); } else { model.init(); Log.write(this, "Publicar", LOG.ERROR, "SQL:" + model.sql, sesion); return(Json(new { msg = Notification.Error(" Error al despublicar") })); } } catch (Exception e) { return(Json(new { msg = Factory.Notification.Error(e.Message) })); } }
public ActionResult DatosPersona(GestiondePagosModel model) { if (model.DatosPersona()) { return(Json(new JavaScriptSerializer().Serialize(model))); } return(View()); }
public ActionResult PublicarDespublicar_Seleccionados(GestiondePagosModel model) { if (sesion == null) { sesion = SessionDB.start(Request, Response, false, db); } model.sesion = sesion; if (!sesion.permisos.havePermission(Privileges[0].Permiso)) { return(Json(new { msg = Notification.notAccess() })); } try { if (model.PublicarDespublicar_Seleccionados()) { Log.write(this, "UPDATE", LOG.BORRADO, "SQL:" + model.sql, sesion); return(Json(new { msg = Notification.Succes("Se han publicado con exito!") })); /*if (model.bandera == "False") * { * Log.write(this, "DELETE", LOG.BORRADO, "SQL:" + model.sql, sesion); * return Json(new { msg = Notification.Succes("Se ha eliminado con exito ") }); * * } * else * { * Log.write(this, "DELETE", LOG.BORRADO, "SQL:" + model.sql, sesion); * return Json(new { msg = Notification.Succes("La operaciĆ³n se realizo con exito! (alguno(s) registro(s) no se pudieron eliminar debido a algun filtro)") }); * * }*/ } else { Log.write(this, "DELETE", LOG.ERROR, "SQL:" + model.sql, sesion); return(Json(new { msg = Notification.Error(" Error al eliminar intentelo nuevamente!") })); } } catch (Exception e) { return(Json(new { msg = Notification.Error(e.Message) })); } }