Example #1
0
        void miEdit_Click(object sender, RoutedEventArgs e)
        {
            dgTextbooks.CancelEdit();
            var dlg = new TextbooksDetailDlg(Window.GetWindow(this), vm.SelectedTextbookItem, vm);

            dlg.ShowDialog();
        }
Example #2
0
        void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new TextbooksDetailDlg(Window.GetWindow(this), vm.NewTextbook(), vm);

            if (dlg.ShowDialog() == true)
            {
                vm.Add(dlg.Item);
            }
        }
Example #3
0
        void miAddByCopy_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new TextbooksDetailDlg(Window.GetWindow(this), vm.NewTextbookByCopy(vm.SelectedTextbookItem), vm);

            if (dlg.ShowDialog() == true)
            {
                vm.Add(dlg.Item);
            }
        }