private void btnAddCar_Click(object sender, EventArgs e)
        {
            AddEditVehicle frm = new AddEditVehicle(this);

            frm.MdiParent = this.MdiParent;
            frm.Show();
        }
Exemplo n.º 2
0
        private void btnNewRental_Click(object sender, EventArgs e)
        {
            AddEditVehicle frm = new AddEditVehicle();

            {
                MdiParent = this.MdiParent;
            }
            frm.Show();
        }
        private void btnEditCar_Click(object sender, EventArgs e)
        {
            var rowIdx = gridvVehicleList.SelectedRows[0].Cells["ID"].Value;
            var car    = _db.TypeOfCars.FirstOrDefault(u => u.TypeOfCarID == (int)rowIdx);

            //Launch AddEditVehicle form with this record
            AddEditVehicle frm = new AddEditVehicle(car, this);

            frm.Name      = "EditCar";
            frm.MdiParent = this.MdiParent;
            frm.Show();
        }