private void lvVehicleList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (lvVehicleList.SelectedItem != null) { VehicleDataEntry clickIn = new VehicleDataEntry((Vehicle)lvVehicleList.SelectedItem, true); clickIn.ShowDialog(); } }
private void BtnNew_Click(object sender, RoutedEventArgs e) { VehicleDataEntry winAdd = new VehicleDataEntry(); winAdd.ShowDialog(); UpdateList(); Close(); }
private void EditCompanyButton_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; Vehicle vehicle = button.DataContext as Vehicle; int index = lvVehicleList.Items.IndexOf(vehicle); VehicleDataEntry window = new VehicleDataEntry(vehicle, false); window.lbl_serviceNeeded.Visibility = Visibility.Hidden; window.lbl_serviceAnswer.Visibility = Visibility.Hidden; window.ShowDialog(); UpdateList(index); }
private void btn_Add_Click(object sender, RoutedEventArgs e) { VehicleDataEntry winAddVehicle = new VehicleDataEntry(); winAddVehicle.ShowDialog(); }