Beispiel #1
0
 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));
 }
Beispiel #2
0
        public static List <InventarioPorPuntoVentaDTO> BuscarInventarioPorPuntoVenta(InventarioPorPuntoVentaModel model, string token)
        {
            var respuestaReq = new AgenteServicio();

            respuestaReq.BuscaInventarioPorPuntoVenta(model, token);
            return(respuestaReq._ListaInventarioPuntoVenta);
        }