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."); } } } }
public RetrieveForm(BicycleParking bp, string ticketNumber) { InitializeComponent(); this.ticketNumber = ticketNumber; this.bp = bp; }
public Form1() { InitializeComponent(); bp = new BicycleParking(1.50, 0.50); }