public ActionResult EditRider(RiderDetailsTable rider) { using (context) { context.Entry(rider).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); return(RedirectToAction("Active", "Rider", new { area = "Admin" })); } }
public ActionResult ApproveTrip(ApproveTripModel model) { using (context) { TripsTable trip = context.TripsTables.Where(x => x.TripID == model.TripID).FirstOrDefault(); trip.DriverID = model.DriverID; trip.TripStatus = (int)ETripStatus.APPROVED; context.Entry(trip).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); return(RedirectToAction("Approved")); } }
public ActionResult EditAddvertise(SellingVehicleDetail model) { using (context) { model.VehicleDescription = model.VehicleDescription.Replace("\r\n", "<br />"); context.Entry(model).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); return(RedirectToAction("Index")); } }