private void BtnEditShuttle_Click(object sender, RoutedEventArgs e) { var vehicle = (ResortVehicle)dtgShuttleVehicles.SelectedItem; // make sure a vehicle is selected if (vehicle == null) { MessageBox.Show("Please select a vehicle"); return; } bool editMode = true; var createShuttleFrm = new FrmManageShuttleVehicle(this, _employee, vehicle, editMode); createShuttleFrm.Show(); }
private void BtnCreateShuttle_Click(object sender, RoutedEventArgs e) { var createShuttleFrm = new FrmManageShuttleVehicle(this, _employee, null, true); createShuttleFrm.Show(); }