/// <summary> /// Brings up the car info page for the <seealso cref="Vehicle"/> /// the <seealso cref="User"/> clicks on. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { Vehicle v1 = (Vehicle)e.Item.Tag; if (v1 != null) { RentalControl.SelectedVehicle = v1; if (isModifySearchPage) { List <string> features = VehicleControl.DisplayCarInfo( RentalControl.SelectedVehicle.VehicleID.ToString()); modifyPanel.Visible = true; searchPanel.Visible = false; FillModifyInfo(features); } else { List <string> features = VehicleControl.DisplayCarInfo( RentalControl.SelectedVehicle.VehicleID.ToString()); carInfoPanel.Visible = true; searchPanel.Visible = false; FillInfo(features); } } }
public void DisplayCarInfoTest() { string id = "1"; Vehicle v2 = new Vehicle("DEFAULT", "DEFAULT", 0, "DEFAULT", "DEFAULT", false, false, 0, "Madison"); List <string> features = VehicleControl.DisplayCarInfo(id); Assert.AreEqual(v2.PrimaryKey, v2.PrimaryKey); }