public ActionResult Remover(AcrescimoMeioTransporte acrescimoMeioTransporte) { var dao = new AcrescimoMeioTransporteDAO(); dao.Remover(acrescimoMeioTransporte); return(RedirectToAction("Listar")); }
public ActionResult Remover(int id) { var dao = new AcrescimoMeioTransporteDAO(); AcrescimoMeioTransporte acrescimo = dao.BuscarPorId(id); return(View(acrescimo)); }
public void Remover(AcrescimoMeioTransporte acrescimoMeioTransporte) { int id = 0; db.AcrescimosMeioTransporte.Where(f => f.TransporteId == id); db.AcrescimosMeioTransporte.Remove(acrescimoMeioTransporte); db.SaveChanges(); }
public ActionResult Atualizar(AcrescimoMeioTransporte acrescimoMeioTransporte) { if (ModelState.IsValid) { var dao = new AcrescimoMeioTransporteDAO(); dao.Atualizar(acrescimoMeioTransporte); return(RedirectToAction("Listar")); } return(View("Atualizar")); }
public void Atualizar(AcrescimoMeioTransporte acrescimoMeioTransporte) { db.AcrescimosMeioTransporte.Update(acrescimoMeioTransporte); db.SaveChanges(); }