private void Edit_Click(object sender, RoutedEventArgs e) { EditDialogView handle = new EditDialogView(); handle.ChangeLabelForStuff(); if (handle.ShowDialog() == true) { if (handle.FirstInput != handle.SecondInput) { MessageBox.Show("Stuff ID did not match.Try again.\n", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } StuffEntryView StfEntryObj = new StuffEntryView(); StfEntryObj.SetForEdit(handle.FirstInput); StfEntryObj.SaveStuff.Content = "Update Stuff"; this.NavigationService.Navigate(StfEntryObj); } }
private void AddNew(object sender, RoutedEventArgs e) { StuffEntryObj = new StuffEntryView(); stuffData.Navigate(StuffEntryObj); }