public ActionResult AlterarStatusVenda(IFormCollection formCollection) { int idVenda = Convert.ToInt32(formCollection["idVenda"]); int idStatus = Convert.ToInt32(formCollection["id"]); _vendaBusiness.AtualizaStatusVenda(idVenda, idStatus); return(RedirectToAction("MinhasVendas")); }
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)); } }