Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "PId,Name,ConatctNo")] tblPassenger tblPassenger)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblPassenger).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblPassenger));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "DId,Name,Salary,Residence,ContactNo")] tblDriver tblDriver)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblDriver).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblDriver));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "RId,Driver,Passenger,RequestLocation,Destination,vehicle,Rent,shift")] tblRide tblRide)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblRide).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Driver    = new SelectList(db.tblDrivers, "DId", "Name", tblRide.Driver);
     ViewBag.Passenger = new SelectList(db.tblPassengers, "PId", "Name", tblRide.Passenger);
     return(View(tblRide));
 }