public void AddRide(object sender, EventArgs e) { RideFacade.Instance().SaveRideInSession((String)Session["username"], StartingPoint.Text, Destination.Text, DepartingDate.Text, DepartingTime.Text); Response.Redirect("~/CarInfo.aspx"); }
public void ConfirmRide(object sender, EventArgs e) { // set car to the ride, add the new car into DB if (EditCarInfo.Visible) { CarFacade.Instance().AddCar(CarType.Text, Int32.Parse(Capacity.Text), LicenseNumber.Text); } else { CarFacade.Instance().AddCar(); } // add the car into the ride object, store the ride into DB RideFacade.Instance().ConfirmRide(); Response.Redirect("~/Confirm.aspx"); }