public ActionResult AgregarSocio(Socio socio_) { Notificacion <Socio> n = null; try { n = new SocioDAO().AgregarSocio(socio_); if (n.Estatus == 200) { socio_.Expedientes = ObtenerFormatosTempHttpPost(Request, socio_); if (!new SocioDAO().AgregarImgExpediente(socio_)) { n.Estatus = -1; n.Mensaje = "Error al guardar los expedientes del usuario"; } } } catch (Exception ex) { n.Estatus = -1; n.Mensaje = ex.Message + ' ' + ex.Source; return(View("Error", new HandleErrorInfo(ex, "Socio", "Socio"))); } return(Json(n, JsonRequestBehavior.AllowGet)); }
public ActionResult Socio() { List <Models.Socio> Lstsocio = new SocioDAO().ObtenerSocios(new Models.Socio() { IdSocio = 0 }); ViewBag.lstSocio = Lstsocio; return(View(new Socio())); }
public ActionResult EliminarExpediente(int idSocio, Expediente exp) { try { Notificacion <String> n = new SocioDAO().EliminarExpediente(idSocio, exp); return(Json(n, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public ActionResult ActualizarEstatusSocio(int idSocio, bool estatus) { try { Notificacion <String> n = new SocioDAO().ActualizarEstatusSocio(idSocio, estatus); return(Json(n, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public ActionResult _ObtenerSocio(int idSocio) { try { List <Models.Socio> Lstsocio = new SocioDAO().ObtenerSocios(new Models.Socio() { IdSocio = 0 }); return(PartialView("_ObtenerSocio", Lstsocio)); } catch (Exception ex) { throw ex; } }
public ActionResult ObtenerSocio(int idSocio) { try { Models.Socio socio = new SocioDAO().ObtenerSocios(new Models.Socio() { IdSocio = idSocio })[0]; socio.Expedientes = new SocioDAO().ObtenerExpedientes(idSocio); socio.Expedientes.ForEach(x => socio.mocks.Add(new MockFile() { name = x.pathExpediente, size = x.pesoByte })); return(Json(socio, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { throw ex; } }
public SocioService() { oSocioDAO = new SocioDAO(); }