public ActionResult Alterar(int txtItemCarrinhoId, int txtQtde, string btnSubmit) { if (!CarrinhoAny) { ErroMessage = "Carrinho Vazio"; return(RedirectToAction("Index", "Home")); } if (btnSubmit == "alterar") { Carrinho.AlterarItemCarrinho(txtItemCarrinhoId, txtQtde); } if (btnSubmit == "remover") { Carrinho.RemoverItemCarrinho(txtItemCarrinhoId); } return(RedirectToAction("Index")); }