private void BtnNew_Click(object sender, RoutedEventArgs e) { RentalDataEntry newWin = new RentalDataEntry(); newWin.ShowDialog(); UpdateList(); }
private void EditButton_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; Rental rental = button.DataContext as Rental; int index = lvRentalList.Items.IndexOf(rental); RentalDataEntry win = new RentalDataEntry(rental, false); win.ShowDialog(); UpdateList(index); }