Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ID_comp,name")] Company company)
 {
     if (ModelState.IsValid)
     {
         db.Entry(company).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(company));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID_psg,name")] Passenger passenger)
 {
     if (ModelState.IsValid)
     {
         db.Entry(passenger).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(passenger));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "trip_no,ID_comp,plane,town_from,town_to,time_out,time_in")] Trip trip)
 {
     if (ModelState.IsValid)
     {
         db.Entry(trip).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID_comp = new SelectList(db.Company, "ID_comp", "name", trip.ID_comp);
     return(View(trip));
 }