コード例 #1
0
        public void EditUser(Object o)
        {
            if (selectedStringPerson != null)
            {
                if (selectedStringPerson == "Underviser")
                {
                    TeacherCuView tview = new TeacherCuView((TeacherEx)SelectedUser);
                    tview.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    tview.ShowDialog();
                    tview.Closing += tview_Closing; // den kører ikke videre indtil viewet lukker.
                }

                if (selectedStringPerson == "Elev")
                {
                    StudentCuView sview = new StudentCuView((Student)SelectedUser);
                    sview.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    sview.ShowDialog();
                    sview.Closing += sview_Closing;
                }

                if (selectedStringPerson == "Forældre")
                {
                    ParentCuView pview = new ParentCuView((ParentEx)SelectedUser);
                    pview.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    pview.ShowDialog();
                    pview.Closing += pview_Closing;
                }

                SelectedStringPerson = selectedStringPerson;
            }
        }
コード例 #2
0
        public void CreateTeacher(Object o)
        {
            TeacherCuView tview = new TeacherCuView();

            tview.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            tview.ShowDialog();
            tview.Closing       += tview_Closing; // den kører ikke videre indtil viewet lukker.
            SelectedStringPerson = "Underviser";  // heri bliver der kaldt GetParents();
            // GetTeachers();
        }