Пример #1
0
 public ActionResult RelatorioVendas()
 {
     if (HttpContext.Session.IsExists("UsuarioLogado"))
     {
         FinanceiroView FinanceiroView = new FinanceiroView()
         {
             Usuario     = (Usuario)HttpContext.Session.GetObject <Usuario>("UsuarioLogado"),
             ListaVendas = _vendaBusiness.ListaVendaDia(DateTime.Now)
         };
         FinanceiroView.Total = _vendaBusiness.CalculoTotalVendas(FinanceiroView.ListaVendas);
         return(View("RelatorioVendas", FinanceiroView));
     }
     else
     {
         return(RedirectToAction("../Login"));
     }
 }
Пример #2
0
 public dynamic Get(DateTime data)
 {
     try
     {
         token = HttpContext.Request?.Headers["token"];
         if (_APIBusiness.ValidarToken(token))
         {
             return(Ok(_vendaBusiness.ListaVendaDia(data)));
         }
         else
         {
             return(Unauthorized());
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }