示例#1
0
 public static RideFacade Instance()
 {
     if (theInstance == null)
     {
         theInstance = new RideFacade();
     }
     return(theInstance);
 }
示例#2
0
        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");
        }
示例#3
0
        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");
        }