public void UpdateTrack(DetailsOfTrack detailsOfTrack) { Track_to_travel tracks = Mapper.ConvertTrackToDal(detailsOfTrack); using (var db = new DataBaseEntities1()) { db.Entry <Track_to_travel>(db.Set <Track_to_travel>().Find(tracks.Track_s_code)).CurrentValues.SetValues(tracks); db.SaveChanges(); } }
public void UpdateVehicle(DetialsOfVehicles detialsOfVehicles) { Details_of_vehicles details_Of_Vehicles = Mapper.ConvertVehiclesIoDal(detialsOfVehicles); using (var db = new DataBaseEntities1()) { db.Entry <Details_of_vehicles>(db.Set <Details_of_vehicles>().Find(details_Of_Vehicles.License_plate)).CurrentValues.SetValues(details_Of_Vehicles); db.SaveChanges(); } }
public void UpdateUser(DetailsOfUser detailsOfUser) { Users users = Mapper.ConvertUserToDal(detailsOfUser); using (var db = new DataBaseEntities1()) { db.Entry <Users>(db.Set <Users>().Find(users.User_s_Id)).CurrentValues.SetValues(users); db.SaveChanges(); } }
public void UpdateTravel(DetailsOfTravel detailsOfTravel) { Travels travels = Mapper.ConvertTravelToDal(detailsOfTravel); using (var db = new DataBaseEntities1()) { db.Entry <Travels>(db.Set <Travels>().Find(travels.Travel_s_code)).CurrentValues.SetValues(travels); db.SaveChanges(); } }
public void UpdatePassenger(DetailsOfPassenger detailsOfPassenger) { Passengers passengers = Mapper.ConvertPassengerToDal(detailsOfPassenger); using (var db = new DataBaseEntities1()) { db.Entry <Passengers>(db.Set <Passengers>().Find(passengers.Passenger_s_code)).CurrentValues.SetValues(passengers); db.SaveChanges(); } }
public void UpdateCustomer(DetailsOfCustomer detailsOfCustomer) { Customers customers = Mapper.ConvertCustomerToDal(detailsOfCustomer); using (var db = new DataBaseEntities1()) { db.Entry <Customers>(db.Set <Customers>().Find(customers.Group_s_code)).CurrentValues.SetValues(customers); db.SaveChanges(); } }