Example #1
0
        private void addCar_Click(object sender, EventArgs e)
        {
            AdminAddCar addCar = new AdminAddCar();

            addCar.ShowDialog();
            if (addCar.DialogResult == DialogResult.OK)
            {
                UpdateCars();
            }
        }
Example #2
0
 private void changeCar_Click(object sender, EventArgs e)
 {
     if (listCars.SelectedItems.Count == 0)
     {
         MessageBox.Show("Вы не выбрали ни одного автомобиля", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         AdminAddCar changeCar = new AdminAddCar(currSelectedCar);
         changeCar.ShowDialog();
         if (changeCar.DialogResult == DialogResult.OK)
         {
             UpdateCars();
         }
     }
 }