private void selectLocation_Click(object sender, EventArgs e) { List <string> locationList = GetLocations(); if ((string)locationsList.SelectedItem == locationList[0]) { Form myForm = new Vehicles(locationList[0]); myForm.Show(); } if ((string)locationsList.SelectedItem == locationList[1]) { Form myForm = new Vehicles(locationList[1]); myForm.Show(); } if ((string)locationsList.SelectedItem == locationList[2]) { Form myForm = new Vehicles(locationList[2]); myForm.Show(); } if ((string)locationsList.SelectedItem == locationList[3]) { Form myForm = new Vehicles(locationList[3]); myForm.Show(); } }
private void selectLocation_Click(object sender, EventArgs e) { //Upon clicking select, the next form that will appear will correspond to the item selected; Form myForm = new Vehicles(SelectedItem); myForm.Show(); }
private void selectLocation_Click(object sender, EventArgs e) { Form myForm = new Vehicles(); myForm.Show();//opens vehicles form to see list of all vehicles }