public RegistroMovimientosController(RegistroValeRepository registroValeRepository, IMapper mapper, ReporteRepository _reporteRepository, FacturaRepository _FacturaRepository) { _registroValeRepository = registroValeRepository; this._FacturaRepository = _FacturaRepository; _mapper = mapper; this._reporteRepository = _reporteRepository; }
public static string cargaRepoDia() { UsuarioCompleto UsuarioCompleto = (UsuarioCompleto)HttpContext.Current.Session["UsuarioCompleto"]; Reporte reportedia = new Reporte(); ReporteRepository r = new ReporteRepository(); Reportes relocal = new Reportes(); Reporte reporDia = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(1)); var json = JsonConvert.SerializeObject(reporDia, Formatting.Indented); return(json); }
public TiboxUnitOfWork() { Products = new BaseRepository <Product>(); Users = new UserRepository(); CatalogoCodigo = new CatalogoCodigoRepository(); Zona = new ZonaRepository(); Persona = new PersonaRepository(); FlujoMaestro = new FlujoRepository(); Credito = new CreditoRepository(); Lenddo = new BaseRepository <WebPersonaLenddo>(); VarNegocio = new BaseRepository <VarNegocio>(); Reporte = new ReporteRepository(); Documento = new DocumentoRepository(); Error = new ErrorRepository(); ReglaNegocio = new ReglaNegocioRepository(); Menu = new MenuRepository(); }
public JsonResult ReportesClientes(string fecha1, string fecha2) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.ReportesClientes(fecha1, fecha2), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult Dashboard_MantaDatos(int SucursalId, int CitaTipo, string fechainicio, string fechafinal) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.GetDashboardMantaDatos(SucursalId, CitaTipo, fechainicio, fechafinal), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult ReporteCitasDiarias(string fecha1, int sucursalid, int codtiporazon, int codrazon) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.ReporteCitasDiarias(sucursalid, fecha1, codtiporazon, codrazon), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult DashboardResolucionPorCita(int sucursalId, string cubiculoId, string fecha1, string fecha2) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.GetDashboardResolucionPorCita(sucursalId, cubiculoId, fecha1, fecha2), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult DashboardRazonCancelacion(int SucursalId, int tipoCita, string ejecutivo, string tipoRazon, string fecha1, string fecha2) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.DashboardRazonCancelacion(SucursalId, tipoCita, ejecutivo, tipoRazon, fecha1, fecha2), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult ReporteFlujoPorIntervalo(int SucursalId, int tipoCita, string fecha1, string fecha2) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.ReporteFlujoPorIntervalo(SucursalId, tipoCita, fecha1, fecha2), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult DashboardConsolidado(int sucursalid, int tipoatencion, string cmb_cubiculo, string fecha1, string fecha2) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.DashboardConsolidado(sucursalid, tipoatencion, cmb_cubiculo, fecha1, fecha2), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public JsonResult ReporteCitasPorEstado(int sucursalid, int estadocita) { ReporteRepository DashboardList = new ReporteRepository(); try { return(Json(DashboardList.ReporteCitasPorEstado(sucursalid, estadocita), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { List <Reportes> list = new List <Reportes>(); Reportes obj = new Reportes(); obj.Accion = 0; obj.Mensaje = ex.Message.ToString(); list.Add(obj); return(Json(list, JsonRequestBehavior.AllowGet)); } }
public static string cargaReporteGraficoDia(string fecha) { UsuarioCompleto UsuarioCompleto = (UsuarioCompleto)HttpContext.Current.Session["UsuarioCompleto"]; ReporteRepository r = new ReporteRepository(); //DateTime FechaDiario = (DateTime)HttpContext.Current.Session["fecha_diario"] == null ? DateTime.Now : (DateTime)HttpContext.Current.Session["fecha_diario"]; DateTime FechaDiario; try { FechaDiario = DateTime.Parse(fecha); } catch (Exception) { FechaDiario = (DateTime)HttpContext.Current.Session["fecha_diario"] == null ? DateTime.Now : (DateTime)HttpContext.Current.Session["fecha_diario"]; } Reporte reporDia = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, FechaDiario); var json = JsonConvert.SerializeObject(reporDia); return(json); }
// [ScriptMethod(UseHttpGet = false)] public static string cargaReporteDia(string fecha) { UsuarioCompleto UsuarioCompleto = (UsuarioCompleto)HttpContext.Current.Session["UsuarioCompleto"]; ReporteRepository r = new ReporteRepository(); //DateTime FechaDiario = (DateTime)HttpContext.Current.Session["fecha_diario"] == null ? DateTime.Now : (DateTime)HttpContext.Current.Session["fecha_diario"]; DateTime FechaDiario; try { FechaDiario = DateTime.Parse(fecha); } catch (Exception) { FechaDiario = (DateTime)HttpContext.Current.Session["fecha_diario"] == null ? DateTime.Now : (DateTime)HttpContext.Current.Session["fecha_diario"]; } Reporte reporDia = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, FechaDiario); ReporteCompleto reporCompleto = new ReporteCompleto(); reporCompleto.calorias = reporDia.calorias; reporCompleto.carbohidratos = reporDia.carbohidratos; reporCompleto.proteina = reporDia.proteina; reporCompleto.grasa = reporDia.grasa; reporCompleto.fibra = reporDia.fibra; reporCompleto.potasio = reporDia.potasio; reporCompleto.calcio = reporDia.calcio; reporCompleto.fosforo = reporDia.fosforo; reporCompleto.hierro = reporDia.hierro; reporCompleto.sodio = reporDia.sodio; reporCompleto.agua = reporDia.agua; reporCompleto.colesterol = reporDia.colesterol; reporCompleto.vitaminaC = reporDia.vitaminaC; var json = JsonConvert.SerializeObject(reporCompleto, Formatting.Indented); return(json); }
public static string cargaRepoQuince() { UsuarioCompleto UsuarioCompleto = (UsuarioCompleto)HttpContext.Current.Session["UsuarioCompleto"]; ReporteRepository r = new ReporteRepository(); Reportes relocal = new Reportes(); Reporte reporte1 = new Reporte(); Reporte reporte2 = new Reporte(); Reporte reporte3 = new Reporte(); Reporte reporte4 = new Reporte(); Reporte reporte5 = new Reporte(); reporte1 = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(1)); reporte2 = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(4)); reporte3 = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(8)); reporte4 = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(12)); reporte5 = r.calcularNutrientesDiarios(UsuarioCompleto.Usuario.id_usuario, relocal.fechaAnterior(15)); Dictionary <String, Decimal> lista1 = new Dictionary <String, Decimal> { { relocal.fechaAnterior(15).ToString("yyyy-MM-dd hh:mm"), reporte5.proteina }, { relocal.fechaAnterior(12).ToString("yyyy-MM-dd hh:mm"), reporte4.proteina }, { relocal.fechaAnterior(8).ToString("yyyy-MM-dd hh:mm"), reporte3.proteina }, { relocal.fechaAnterior(4).ToString("yyyy-MM-dd hh:mm"), reporte2.proteina }, { relocal.fechaAnterior(1).ToString("yyyy-MM-dd hh:mm"), reporte1.proteina } }; Dictionary <String, Decimal> lista2 = new Dictionary <String, Decimal> { { relocal.fechaAnterior(15).ToString("yyyy-MM-dd hh:mm"), reporte5.carbohidratos }, { relocal.fechaAnterior(12).ToString("yyyy-MM-dd hh:mm"), reporte4.carbohidratos }, { relocal.fechaAnterior(8).ToString("yyyy-MM-dd hh:mm"), reporte3.carbohidratos }, { relocal.fechaAnterior(4).ToString("yyyy-MM-dd hh:mm"), reporte2.carbohidratos }, { relocal.fechaAnterior(1).ToString("yyyy-MM-dd hh:mm"), reporte1.carbohidratos } }; Dictionary <String, Decimal> lista3 = new Dictionary <String, Decimal> { { relocal.fechaAnterior(15).ToString("yyyy-MM-dd hh:mm"), reporte5.grasa }, { relocal.fechaAnterior(12).ToString("yyyy-MM-dd hh:mm"), reporte4.grasa }, { relocal.fechaAnterior(8).ToString("yyyy-MM-dd hh:mm"), reporte3.grasa }, { relocal.fechaAnterior(4).ToString("yyyy-MM-dd hh:mm"), reporte2.grasa }, { relocal.fechaAnterior(1).ToString("yyyy-MM-dd hh:mm"), reporte1.grasa } }; Dictionary <String, Decimal> lista4 = new Dictionary <String, Decimal> { { relocal.fechaAnterior(15).ToString("yyyy-MM-dd hh:mm"), reporte5.agua }, { relocal.fechaAnterior(12).ToString("yyyy-MM-dd hh:mm"), reporte4.agua }, { relocal.fechaAnterior(8).ToString("yyyy-MM-dd hh:mm"), reporte3.agua }, { relocal.fechaAnterior(4).ToString("yyyy-MM-dd hh:mm"), reporte2.agua }, { relocal.fechaAnterior(1).ToString("yyyy-MM-dd hh:mm"), reporte1.agua } }; Dictionary <String, Decimal> lista5 = new Dictionary <String, Decimal> { { relocal.fechaAnterior(15).ToString("yyyy-MM-dd hh:mm"), reporte5.fibra }, { relocal.fechaAnterior(12).ToString("yyyy-MM-dd hh:mm"), reporte4.fibra }, { relocal.fechaAnterior(8).ToString("yyyy-MM-dd hh:mm"), reporte3.fibra }, { relocal.fechaAnterior(4).ToString("yyyy-MM-dd hh:mm"), reporte2.fibra }, { relocal.fechaAnterior(1).ToString("yyyy-MM-dd hh:mm"), reporte1.fibra } }; List <Object> listafull = new List <Object>(); listafull.Add(lista1); listafull.Add(lista2); listafull.Add(lista3); listafull.Add(lista4); listafull.Add(lista5); var json = JsonConvert.SerializeObject(listafull, Formatting.Indented); return(json); }
/// <summary> /// Constructor con token /// </summary> public ReporteBusiness(TokenDto token) { this.repository = new ReporteRepository(); this.token = token; }
/// <summary> /// Constructor por default /// </summary> public ReporteBusiness() { this.repository = new ReporteRepository(); }