public ActionResult DeleteConfirmed(int id)
        {
            CarOwner carOwner = db.CarOwner.Find(id);

            if (carOwner == null)
            {
                return(HttpNotFound());
            }
            db.CarOwner.Remove(carOwner);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit(Waybill waybill)
 {
     db.Entry(waybill).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult CreateOrder(Orders order)
 {
     db.Orders.Add(order);
     db.SaveChanges();
     return(View("Complete"));
 }
 public ActionResult CreateRide(Ride ride)
 {
     db.Ride.Add(ride);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Exemplo n.º 5
0
 public ActionResult CreateDriver(Drivers driver)
 {
     db.Drivers.Add(driver);
     db.SaveChanges();
     return(RedirectToAction("DriverList"));
 }