public ActionResult Edit(RouteM xx) { BusdbEntities db = new BusdbEntities(); var find = db.routes.Where(x => x.rid == xx.Routeid).FirstOrDefault(); find.rid = xx.Routeid; find.from_location = xx.FromLocation; find.to_location = xx.ToLocation; db.Entry(find).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("index")); }
public ActionResult Edit(Buses xx) { BusdbEntities db = new BusdbEntities(); var find = db.buses.Where(x => x.bid == xx.Busid).FirstOrDefault(); find.bid = xx.Busid; find.bname = xx.BusName; find.btype = xx.BusType; find.max_seats = xx.MaxSeat; db.Entry(find).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("index")); }
public ActionResult Edit(RbScheduleM xx) { BusdbEntities db = new BusdbEntities(); var find = db.rbschedules.Where(x => x.sid == xx.sid).FirstOrDefault(); find.sid = xx.sid; find.rid = xx.rid; find.bid = xx.bid; find.fare = xx.fare; find.departure_date = xx.departure_date; find.departure_time = xx.departure_time; db.Entry(find).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("index")); }
public ActionResult Edit(ReserveM xx) { BusdbEntities db = new BusdbEntities(); var find = db.reserves.Where(x => x.ticket_no == xx.ticket_no).FirstOrDefault(); find.email = xx.email; find.gender = xx.gender; find.name = xx.name; find.phone_no = xx.phone_no; find.rid = xx.routeId; find.sid = xx.scheduleId; find.seat_no = xx.seat_no; find.ticket_no = xx.ticket_no; db.Entry(find).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("index")); }