Exemplo n.º 1
0
 public void EditVModel(VehicleModel VModel)
 {
     using (db = new vjezbaEntities())
     {
         db.Entry(VModel).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void EditVMake(VehicleMake VMake)
 {
     using (vjezbaEntities db = new vjezbaEntities())
     {
         db.Entry(VMake).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Name")] VehicleMake vehicleMake)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vehicleMake).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(vehicleMake));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "Id,MakeId,Name")] VehicleModel vehicleModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vehicleModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MakeId = new SelectList(db.VehicleMake, "Id", "Name", vehicleModel.MakeId);
     return(View(vehicleModel));
 }