private void btnAdd_Click(object sender, EventArgs e) { frmAddVehicle addVehicleForm = new frmAddVehicle(); Vehicle vehicle = addVehicleForm.GetNewVehicle(); if (vehicle != null) { vehicles.Add(vehicle); } }
private void btnAdd_Click(object sender, EventArgs e) { frmAddVehicle addCustomerForm = new frmAddVehicle(); Vehicle vehicle = addCustomerForm.GetNewVehicle(); if (vehicle != null) { vehicles.Add(vehicle); VehicleDB.SaveVehicle(vehicles); FillVehicleListBox(); } }