예제 #1
0
 public StatisticsForm(BicycleParking bp, string partialZipcode)
 {
     InitializeComponent();
     this.Text = $"Statistics for zipcode {partialZipcode}";
     this.bp   = bp;
     lbxBicycles.Items.Clear();
     if (bp.GetAllRetrievedBicyclesByZipcode(partialZipcode) == null)
     {
         lbxBicycles.Items.Add("No data was found with this partial zipcode.");
     }
     else
     {
         foreach (Bicycle b in bp.GetAllRetrievedBicyclesByZipcode(partialZipcode))
         {
             if (b != null)
             {
                 lbxBicycles.Items.Add(b.GetInfo());
             }
             else
             {
                 lbxBicycles.Items.Add("No data was found with this partial zipcode.");
             }
         }
     }
 }
예제 #2
0
 public RetrieveForm(BicycleParking bp, string ticketNumber)
 {
     InitializeComponent();
     this.ticketNumber = ticketNumber;
     this.bp           = bp;
 }
예제 #3
0
 public Form1()
 {
     InitializeComponent();
     bp = new BicycleParking(1.50, 0.50);
 }