private void NewPublication(object sender, RoutedEventArgs e)
        {
            switch (OnScreenContent)
            {
            case PageAuthors pageAuthors:
            {
                var p0 = new WindowAddEditUserAuthor(this, false);
                p0.ShowDialog();
                pAuthors.UpdateLayout();
                break;
            }

            case PagePublications pagePublications:
            {
                var p1 = new WindowAddEditPublication(this);
                p1.ShowDialog();
                pPublications.UpdateLayout();
                break;
            }

            case PageUsers pageUsers:
            {
                var p2 = new WindowAddEditUserAuthor(this, true);
                p2.ShowDialog();
                pUsers.UpdateLayout();
                break;
            }
            }
        }
예제 #2
0
        private void Add_OnClick(object sender, RoutedEventArgs e)
        {
            var p1 = new WindowAddEditPublication(Owner);

            p1.ShowDialog();
            UpdateLayout();
        }
예제 #3
0
        private void Edit_OnClick(object sender, RoutedEventArgs e)
        {
            var item = DataGrid.SelectedItem as DbPublication;
            var p    = new WindowAddEditPublication(Owner, item);

            p.ShowDialog();
            UpdateLayout();
        }