示例#1
0
 public ActionResult Edit([Bind(Include = "unit_number,plate_number,registration,vin_number,make,year,weight,status,owner_company,driver,last_location,last_trip")] truck truck)
 {
     if (ModelState.IsValid)
     {
         db.Entry(truck).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(truck));
 }
 public ActionResult Edit([Bind(Include = "driver_id,first_name,last_name,address,postal_code,city,province,corporation,phone,dob,nationality,gender,pp_number,license_number,license_expiry,medical_date,rate,rate_team")] table_driver table_driver)
 {
     if (ModelState.IsValid)
     {
         db.Entry(table_driver).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(table_driver));
 }