public ActionResult Atualizar(int id) { var dao = new AcrescimoMotivoViagemDAO(); AcrescimoMotivoViagem acrescimo = dao.BuscaPorId(id); return(View(acrescimo)); }
public void Remover(AcrescimoMotivoViagem acrescimoMotivoViagem) { int id = 0; db.AcrescimosMotivoViagem.Where(f => f.MotivoId == id); db.AcrescimosMotivoViagem.Remove(acrescimoMotivoViagem); db.SaveChanges(); }
public ActionResult Atualizar(AcrescimoMotivoViagem acrescimoMotivoViagem) { if (ModelState.IsValid) { var dao = new AcrescimoMotivoViagemDAO(); dao.Atualizar(acrescimoMotivoViagem); return(RedirectToAction("Listar")); } return(View("Atualizar")); }
public void Atualizar(AcrescimoMotivoViagem acrescimoMotivoViagem) { db.AcrescimosMotivoViagem.Update(acrescimoMotivoViagem); db.SaveChanges(); }