public RespuestaReporte obtenerReporteAlumnoWs(string run) { List <ReporteFinanciero> reporte = null; RespuestaReporte respuesta = null; try { reporte = ReporteFinancieroBLL.getInstance.getReporteByRut(run); respuesta = new RespuestaReporte(); respuesta.status = "ok"; respuesta.mensaje = "success"; foreach (ReporteFinanciero item in reporte) { respuesta.reporteList.Add(item); } } catch (Exception ex) { respuesta = new RespuestaReporte(); respuesta.status = "error"; respuesta.mensaje = ex.Message; } return(respuesta); }
/// <summary> /// Obtiene las deudas de un usuario segun su rut a través del servicio de la app central /// </summary> /// <param name="run"></param> /// <returns></returns> public static List <ReporteFinanciero> getReporteByRut(string run) { AlumnoSv.AlumnoWsClient ws = null; RespuestaReporte response = null; List <ReporteFinanciero> list = null; response = new RespuestaReporte(); ws = new AlumnoSv.AlumnoWsClient(); response = ws.obtenerReporteAlumnoWs(run); if (response.status == "error") { throw new Exception(response.mensaje); } else { list = new List <ReporteFinanciero>(); list = response.reporteList; } return(list); }