コード例 #1
0
        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);
            }
        }
コード例 #2
0
 private void AddNew(object sender, RoutedEventArgs e)
 {
     StuffEntryObj = new StuffEntryView();
     stuffData.Navigate(StuffEntryObj);
 }