public ActionResult SetPrestamo(int solicitud_id, string view) { PrestamosManager prestamos = new PrestamosManager(); var result = new Prestamos(); try { initiateDropDownSolicitud(); Datos_Sistema data = bussinessInfo(); if (solicitud_id != 0) { var listResult = prestamos.Set(solicitud_id, ViewBag.LoggedId); if (listResult != null) { result = listResult; result.Intereses_Pagados = result.Monto_Aprobado * (data.porc_gastos_cierre_max / 100); if (data.gasto_cierre_MIN <= result.Monto_Aprobado) { result.Intereses_Pagados = data.gasto_cierre_referencia_min; } DocumentManager doc = new DocumentManager(); result.Documentos = doc.Get(int.Parse(ConfigurationManager.AppSettings["FlujoPrestamos"])); TablaAmortizacionManager tablManager = new TablaAmortizacionManager(); result.amortizacion = tablManager.Get(result.Prestamo_Id); } } return(PartialView(view, result)); } catch (Exception ex) { ViewBag.ErrorMen = ex.Message; } return(PartialView(view, result)); }
public ActionResult Index(Datos_Sistema model) { try { bussinessInfo(); ViewBag.DrpColor = GetDrpColor(); manager = new SetUpManager(); model.Logo_Negocio = Upload_File("fileUpload", "logo"); model.Icon = Upload_File("fileUploadIcon", "icon"); var result = manager.Set(model); Set_Message("Datos Guardados Correctamente"); return(View(result)); } catch (Exception ex) { Set_Message("Ha Ocurrido Un Error: " + ex.Message); } return(View(model)); }