Interaction logic for CreateStudentProfile.xaml
Inheritance: System.Windows.Window
Ejemplo n.º 1
0
        private void menuCreateStudent_Click(object sender, RoutedEventArgs e)
        {
            StudentProfile Studentform = new StudentProfile(IsAdmin);

            Studentform.Closed += new EventHandler((s0, e0) => { studentSearch_BTN_Click(s0, null); });
            Studentform.Show();
        }
Ejemplo n.º 2
0
        private void newStudentProfile_BTN_Click(object sender, RoutedEventArgs e)
        {
            StudentProfile form = new StudentProfile(IsAdmin);

            form.Closed += new EventHandler((s0, e0) => studentSearch_BTN_Click(s0, null));
            form.Show();
        }
Ejemplo n.º 3
0
        private void Edit_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (dbMethods.CheckDatabaseConnection())
            {
                using (PubsDataContext datab = new PubsDataContext())
                {
                    Student studentRow = studentSearch_DataGrid.SelectedItem as Student;
                    Student stud       = (from s in datab.Students
                                          where s.Student_ID == studentRow.Student_ID
                                          select s).Single();

                    StudentProfile studentForm = new StudentProfile(stud, IsAdmin, true);
                    studentForm.Show();
                }
            }
        }
Ejemplo n.º 4
0
        private void StudentSearch_DataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            using (PubsDataContext datab = new PubsDataContext())
            {
                Student studentRow = studentSearch_DataGrid.SelectedItem as Student;
                if (studentRow != null)
                {
                    Student stud = (from s in datab.Students
                                    where s.Student_ID == studentRow.Student_ID
                                    select s).Single();

                    StudentProfile studentForm = new StudentProfile(stud, IsAdmin, true);
                    studentForm.Closed += new EventHandler((s0, e0) => studentSearch_BTN_Click(s0, null));
                    studentForm.Show();
                }
            }
        }
Ejemplo n.º 5
0
        private void Add_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            StudentProfile form = new StudentProfile(IsAdmin);

            form.Show();
        }
Ejemplo n.º 6
0
 private void Add_MenuItem_Click(object sender, RoutedEventArgs e)
 {
     StudentProfile form = new StudentProfile(IsAdmin);
     form.Show();
 }
Ejemplo n.º 7
0
        private void StudentSearch_DataGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            using (PubsDataContext datab = new PubsDataContext())
            {
                Student studentRow = studentSearch_DataGrid.SelectedItem as Student;
                if (studentRow != null)
                {
                    Student stud = (from s in datab.Students
                                    where s.Student_ID == studentRow.Student_ID
                                    select s).Single();

                    StudentProfile studentForm = new StudentProfile(stud, IsAdmin, true);
                    studentForm.Closed += new EventHandler((s0, e0) => studentSearch_BTN_Click(s0, null));
                    studentForm.Show();
                }
            }
        }
Ejemplo n.º 8
0
 private void newStudentProfile_BTN_Click(object sender, RoutedEventArgs e)
 {
     StudentProfile form = new StudentProfile(IsAdmin);
     form.Closed += new EventHandler((s0, e0) => studentSearch_BTN_Click(s0, null));
     form.Show();
 }
Ejemplo n.º 9
0
 private void menuCreateStudent_Click(object sender, RoutedEventArgs e)
 {
     StudentProfile Studentform = new StudentProfile(IsAdmin);
     Studentform.Closed += new EventHandler((s0, e0) => { studentSearch_BTN_Click(s0, null); });
     Studentform.Show();
 }
Ejemplo n.º 10
0
        private void Edit_MenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (dbMethods.CheckDatabaseConnection())
            {
                using (PubsDataContext datab = new PubsDataContext())
                {
                    Student studentRow = studentSearch_DataGrid.SelectedItem as Student;
                    Student stud = (from s in datab.Students
                                    where s.Student_ID == studentRow.Student_ID
                                    select s).Single();

                    StudentProfile studentForm = new StudentProfile(stud, IsAdmin, true);
                    studentForm.Show();
                }
            }
        }