Ejemplo n.º 1
0
        public ActionResult AlterarStatusVenda(IFormCollection formCollection)
        {
            int idVenda  = Convert.ToInt32(formCollection["idVenda"]);
            int idStatus = Convert.ToInt32(formCollection["id"]);

            _vendaBusiness.AtualizaStatusVenda(idVenda, idStatus);
            return(RedirectToAction("MinhasVendas"));
        }
Ejemplo n.º 2
0
 public dynamic Put(int id, int idStatus)
 {
     try
     {
         token = HttpContext.Request?.Headers["token"];
         if (_APIBusiness.ValidarToken(token))
         {
             return(Ok(_vendaBusiness.AtualizaStatusVenda(id, idStatus)));
         }
         else
         {
             return(Unauthorized());
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }