public ActionResult Reporte([Bind(Include = "servicio")] ReporteServicio reporte) { int idServicio = int.Parse(Request.Form["servicio"].ToString()); ViewBag.servicio = new SelectList(logica.ListarServicios(), "ID_Servicio", "Descripción"); return(View(logica.ReporteServicio(idServicio))); }
public ActionResult InventarioXPuntoVenta(InventarioPorPuntoVentaModel model = null) { if (Session["StringToken"] == null) { return(RedirectToAction("Index", "Home")); } tkn = Session["StringToken"].ToString(); if (TempData["DataSource"] != null) { TempData["DataSource"] = null; } if (model == null) { model = new InventarioPorPuntoVentaModel(); } model.Pipas = PedidosServicio.ObtenerPipas(TokenServicio.ObtenerIdEmpresa(tkn), tkn).Select(x => { x.Activo = false; return(x); }).ToList(); model.Estaciones = CatalogoServicio.GetListaEstacionCarburacion(tkn).Select(x => { x.Activo = false; return(x); }).ToList(); if (model != null && !model.Fecha.Equals(DateTime.MinValue)) { ViewData["Periodo"] = model.Fecha; ViewData["Reporte"] = TiposReporteConst.InventarioPorPuntoVenta; TempData["DataSource"] = ReporteServicio.BuscarInventarioPorPuntoVenta(model, tkn); } return(View(model)); }
public ActionResult HistoricoVsVentas(HistoricoVentasConsulta model = null) { if (Session["StringToken"] == null) { return(RedirectToAction("Index", "Home")); } tkn = Session["StringToken"].ToString(); if (TempData["DataSource"] != null) { TempData["DataSource"] = null; } if (TempData["year"] != null) { model.Years = (List <YearsDTO>)TempData["year"]; } if (model.Years == null) { TempData["year"] = model.Years = HistoricoServicio.GetYears(tkn); } if (model != null && model.Years.Exists(x => x.Seleccionar)) { ViewData["Reporte"] = TiposReporteConst.HistoricoVsVentas; TempData["DataSource"] = ReporteServicio.BuscarHistoricoVSVentas(model, tkn); TempData["json"] = HistoricoServicio.GetJson(model, tkn); } return(View(model)); }
public ReporteServicio ReporteServicio(int ID_Servicio) { ReporteServicio reporte = new ReporteServicio(); Servicios servicio = new Servicios(); servicio.ID_Servicio = ID_Servicio; reporte.vehiculos = AccesoServicio.ListarVehiculos(servicio); return(reporte); }
public ActionResult CallCenter(CallCenterModel model = null) { if (Session["StringToken"] == null) { return(RedirectToAction("Index", "Home")); } tkn = Session["StringToken"].ToString(); if (TempData["DataSource"] != null) { TempData["DataSource"] = null; } if (model != null && !model.Periodo.Equals(DateTime.MinValue)) { ViewData["Reporte"] = TiposReporteConst.CallCenter; TempData["DataSource"] = ReporteServicio.BuscarCallCenter(model, tkn); } return(View(model)); }
public ActionResult GastoVehicular(GastoVehiculoModel model = null) { if (Session["StringToken"] == null) { return(RedirectToAction("Index", "Home")); } tkn = Session["StringToken"].ToString(); if (TempData["DataSource"] != null) { TempData["DataSource"] = null; } if (model != null && !model.FechaFin.Equals(DateTime.MinValue) && !model.FechaInicio.Equals(DateTime.MinValue)) { ViewData["Reporte"] = TiposReporteConst.GastoVehicular; TempData["DataSource"] = ReporteServicio.BuscarGastoVehicular(model, tkn); } return(View(model)); }
private void BtnAceptar_Click(object sender, EventArgs e) { IReporteFactura reporte = new ReporteFactura(); IReporteProducto reporteP = new ReporteProducto(); IReporteServicio reporteS = new ReporteServicio(); if (getFiltro().Equals("Facturas")) { if (getFechaInicial().Length == 0 && getFechaFinal().Length == 0) { MessageBox.Show("No ingresó ningúna fecha. Por favor ingrese un rango de fecha"); } else { reporte.reporteFacturas(getFechaInicial().ToString(), getFechaFinal().ToString(), dataGridView1); } } else if (getFiltro().Equals("Productos")) { if (getFechaInicial().Length == 0 && getFechaFinal().Length == 0) { MessageBox.Show("No ingresó ningúna fecha. Por favor ingrese un rango de fecha"); } else { reporteP.reporteProducto(getFechaInicial().ToString(), getFechaFinal().ToString(), dataGridView1); } } else if (getFiltro().Equals("Servicios")) { if (getFechaInicial().Length == 0 && getFechaFinal().Length == 0) { MessageBox.Show("No ingresó ningúna fecha. Por favor ingrese un rango de fecha"); } else { reporteS.reporteServicio(getFechaInicial().ToString(), getFechaFinal().ToString(), dataGridView1); } } }
public ActionResult HistoricoPrecioVenta(HistoricoPrecioVentaModel model = null) { if (Session["StringToken"] == null) { return(RedirectToAction("Index", "Home")); } tkn = Session["StringToken"].ToString(); if (TempData["DataSource"] != null) { TempData["DataSource"] = null; } if (model == null) { model = new HistoricoPrecioVentaModel(); } ViewData["Reporte"] = TiposReporteConst.HistoricoPrecioVenta; if (model != null && !model.FechaFinal.Equals(DateTime.MinValue) && !model.FechaInicial.Equals(DateTime.MinValue)) { TempData["DataSource"] = ReporteServicio.BuscarHistoricoPrecioVenta(model, tkn); } return(View(model)); }