Пример #1
0
        //add vehicle button
        private void button1_Click(object sender, EventArgs e)
        {
            frmAddVehicle frmAddVehicle = new frmAddVehicle();

            frmAddVehicle.FormClosed += async delegate {
                await GetData();
            };
            frmAddVehicle.ShowDialog();
        }
Пример #2
0
 private void dgvVehicleList_CellClick_1(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         if (e.ColumnIndex == 11)
         {
             int result = int.Parse(dgvVehicleList.Rows[e.RowIndex].Cells[0].Value.ToString());
             if (result != 0)
             {
                 frmAddVehicle frmAdd = new frmAddVehicle(result);
                 frmAdd.FormClosed += async delegate {
                     await GetBrand();
                 };
                 frmAdd.ShowDialog();
             }
         }
     }
 }