private void BtnNew_Click(object sender, RoutedEventArgs e) { Vehicle_DataEntry winAdd = new Vehicle_DataEntry(); winAdd.ShowDialog(); UpdateList(); }
private void lvVehicleList_MouseDoubleClick(object sender, MouseButtonEventArgs e) { if (lvVehicleList.SelectedItem != null) { Vehicle_DataEntry clickIn = new Vehicle_DataEntry((Vehicle)lvVehicleList.SelectedItem, true); clickIn.ShowDialog(); } }
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); Vehicle_DataEntry window = new Vehicle_DataEntry(vehicle, false); window.ShowDialog(); UpdateList(index); }
private void btn_Add_Click(object sender, RoutedEventArgs e) { Vehicle_DataEntry winAddVehicle = new Vehicle_DataEntry(); winAddVehicle.ShowDialog(); }