Пример #1
0
        private void editVehicleButton_Click(object sender, EventArgs e)
        {
            if (vehiclesListBox.SelectedItem != null)
            {
                AddEditVehicleForm editVehicleForm = new AddEditVehicleForm((Vehicle)vehiclesListBox.SelectedItem, EDIT_VEHICLE, getMakesList(), this);
                editVehicleForm.Show();

                //reset the list of vehicles so old data doesn't hang out after we edit it
                vehiclesListBox.DataSource = null;
            }
        }
Пример #2
0
        private void addVehicleButton_Click(object sender, EventArgs e)
        {
            AddEditVehicleForm addVehicleForm = new AddEditVehicleForm(null, ADD_VEHICLE, getMakesList(), this);

            addVehicleForm.Show();
        }