Пример #1
0
        private void btnAddNewCar_Click(object sender, EventArgs e) {
            NewCarDialog dlg = new NewCarDialog();

            if (dlg.ShowDialog() == DialogResult.OK) {
                carsInStock.Add(dlg.theCar);
            }

            UpdateGrid();
        }
Пример #2
0
 private void btnAddToInventory_Click(object sender, EventArgs e)
 {
     NewCarDialog d = new NewCarDialog();
     if (d.ShowDialog() == DialogResult.OK)
     {
         _carsInStock.Add(d.TheCar);
         UpdateGrid();
     }
 }
Пример #3
0
        private void btnAddNewCar_Click(object sender, EventArgs e)
        {
            NewCarDialog d = new NewCarDialog();

            if (d.ShowDialog() == DialogResult.OK)
            {
                carsInStock.Add(d.theCar);
                UpdateGrid();
            }
        }
Пример #4
0
        private void btnAddNewCar_Click(object sender, EventArgs e)
        {
            NewCarDialog d = new NewCarDialog();

            if (d.ShowDialog() == DialogResult.OK)
            {
                // Добавить новый автомобиль в список
                carsInStock.Add(d.theCar);
                UpdateGrid();
            }
        }
Пример #5
0
 private void btnAddNewCar_Click(object sender, EventArgs e)
 {
     using (NewCarDialog d = new NewCarDialog())
     {
         if (d.ShowDialog() == DialogResult.OK)
         {
             //  向列表中添加一个新的Car
             CarsInStock.Add(d.theCar);
             UpdateGrid();
         }
     }
 }
Пример #6
0
 private void btnAddNewCar_Click(object sender, EventArgs e)
 {
     NewCarDialog d = new NewCarDialog();
     if (d.ShowDialog() == DialogResult.OK)
     {
         // Add new car to list.
         carsInStock.Add(d.theCar);
         UpdateGrid();
     }
 }