Exemplo n.º 1
0
 // GET: Venta
 public async Task <IActionResult> Index()
 {
     try
     {
         ViewBag.CantidadAlarmas = (await productoRepository.GetCantidadAlarmas()).Cantidad;
         return(View(await ventaRepository.GetAll()));
     }
     catch (Exception e)
     {
         return(StatusCode((int)System.Net.HttpStatusCode.Unauthorized, e.Message));
         //return Unauthorized(e.Message);
     }
 }
Exemplo n.º 2
0
 public IEnumerable <Venta> GetAll()
 {
     return(ventaRepo.GetAll());
 }