Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            CarEditForm newForm = new CarEditForm();

            newForm.ShowDialog();
            RefreshCarList();
        }
Esempio n. 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            int caID = (int)carListDataGridView.SelectedRows[0].Cells[0].Value;

            CarEditForm newForm = new CarEditForm();

            foreach (CarInfo car in _carList)
            {
                if (car.CarID == caID)
                {
                    car.GetCar(caID);
                    newForm._newCar = car;
                    if (newForm.ShowDialog() == DialogResult.OK)
                    {
                        newForm._newCar.UpdateCar();
                    }
                }
            }
            RefreshCarList();
        }