示例#1
0
        public ActionResult Remover(AcrescimoMeioTransporte acrescimoMeioTransporte)
        {
            var dao = new AcrescimoMeioTransporteDAO();

            dao.Remover(acrescimoMeioTransporte);
            return(RedirectToAction("Listar"));
        }
示例#2
0
        public ActionResult Remover(int id)
        {
            var dao = new AcrescimoMeioTransporteDAO();
            AcrescimoMeioTransporte acrescimo = dao.BuscarPorId(id);

            return(View(acrescimo));
        }
示例#3
0
        public void Remover(AcrescimoMeioTransporte acrescimoMeioTransporte)
        {
            int id = 0;

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