// // GET: /Solicitud/ public ActionResult Add(int id = 0) { manager = new SolicitudManager(); manager_fuente_ingreso = new FuenteIngresoManager(); solicitante_Manager = new SolicitanteManager(); referencias_manager = new ReferenciasManager(); bussinessInfo(); initiateDropDownSolicitud(); var result = new Solicitud(); if (id != 0) { var listResult = manager.Get("", id, "", 0, 0); if (listResult != null && listResult.Count > 0) { result = listResult[0]; result.solicitante = solicitante_Manager.Get(result.Cedula); result.Fuente_Ingreso = manager_fuente_ingreso.Get(result.Cedula); result.referencias_Personales = referencias_manager.Get(result.Cedula); DocumentManager doc = new DocumentManager(); result.Documentos = doc.Get(int.Parse(ConfigurationManager.AppSettings["FlujoSolicitud"])); } } return(View(result)); }
public ActionResult GetAll(string partial_view) { manager = new SolicitudManager(); var result = manager.Get("", 0, "", 1, 0); #region PreparandoArchivoDescarga string fileName = "SolicitudCreadas.csv"; //Areglando lista. var dataReport = (from a in result select new { Cedula = a.Cedula.ToString(), Monto_Prestamo = a.Monto_Prestamo.ToString(), Ingresos_Solicitante = a.Ingresos_Solicitante.ToString(), Periodicidad_Desc = a.Periodicidad_Desc, Interes = a.Interes, Plazo = a.Plazo, Cobrador = a.Cobrador } ).ToList(); Create_Excel_Reports(fileName, dataReport); #endregion return(PartialView(partial_view, result)); }
public ActionResult Aprobadas() { manager = new SolicitudManager(); bussinessInfo(); initiateDropDownSolicitud(); var result = manager.Get("", 0, "", 3, 0); if (result != null && result.Count > 0) { foreach (Solicitud sol in result) { solicitante_Manager = new SolicitanteManager(); sol.solicitante = solicitante_Manager.Get(sol.Cedula); } } #region PreparandoArchivoDescarga string fileName = "SolicitudAprobadas.csv"; //Areglando lista. var dataReport = (from a in result select new { Cedula = a.Cedula.ToString(), Monto_Prestamo = a.Monto_Prestamo.ToString(), Ingresos_Solicitante = a.Ingresos_Solicitante.ToString(), Periodicidad_Desc = a.Periodicidad_Desc, Interes = a.Interes, Plazo = a.Plazo, Cobrador = a.Cobrador, Nombre = (a.solicitante.Nombre + " " + a.solicitante.Apellidos) } ).ToList(); Create_Excel_Reports(fileName, dataReport); #endregion return(View(result)); }
public ActionResult GetSingle(int Id_Rol, string partial_view) { manager = new SolicitudManager(); bussinessInfo(); initiateDropDownSolicitud(); var result = new Solicitud(); if (Id_Rol != 0) { var listResult = manager.Get("", Id_Rol, "", 1, 0); if (listResult != null && listResult.Count > 0) { result = listResult[0]; solicitante_Manager = new SolicitanteManager(); result.solicitante = solicitante_Manager.Get(result.Cedula); } } return(PartialView(partial_view, result)); }