public ActionResult Update(int id, int idCliente, int idCategoria, string nome, DateTime dataVencimento, DateTime dataPagamento, decimal valor) { ContaPagar contaPagar = new ContaPagar(); contaPagar.Id = id; contaPagar.IdCliente = idCliente; contaPagar.IdCategoria = idCategoria; contaPagar.Nome = nome; contaPagar.DataVencimento = dataVencimento; contaPagar.DataPagamento = dataPagamento; contaPagar.Valor = valor; repository.Update(contaPagar); return(RedirectToAction("Index")); }
public ActionResult Update(int id, string nome, decimal valor, string tipo, string descricao, string status) { ContaPagar contaPagar = new ContaPagar(); contaPagar.Id = id; contaPagar.Nome = nome; contaPagar.Valor = valor; contaPagar.Tipo = tipo; contaPagar.Descricao = descricao; contaPagar.Status = status; ContaPagarRepository repository = new ContaPagarRepository(); repository.Update(contaPagar); return(RedirectToAction("Index")); }