//Edit Ride status in database /// <summary> /// Edits the Ride status inside the database /// </summary> /// <param name="ride"></param> /// <param name="status"></param> public void EditRideStatus(Ride ride, string status) { //Get database rows RidesDataTable rideRows = new RidesDataTable(); AdapterManager.RidesTableAdapter.Fill(rideRows); //Find the rows to edit RidesRow row = rideRows.FindById(ride.Id); //Update the row with edited data row.Status = status; //Save changes AdapterManager.RidesTableAdapter.Update(rideRows); }
//EDIT //Edit Ride category /// <summary> /// Edits a Ride category /// </summary> /// <param name="ride"></param> /// <param name="status"></param> public void EditRideStatus(Ride ride, string status) { data.EditRideStatus(ride, status); }
//ADD //Add ride to database /// <summary> /// Adds a Ride to the database /// </summary> /// <param name="ride"></param> public void AddRide(Ride ride) { data.AddRide(ride); }