Esempio n. 1
0
        private void AssignSessionForCourseBtn_Click(object sender, EventArgs e)
        {
            ComboboxItem cb      = (ComboboxItem)sessionsComboBox.SelectedItem;
            ExamSession  session = ExamSessionDAL.GetById((int)cb.Value);//el id ele rage3 mn el session ele et3amalaha create

            updateCourse();

            CourseExamSessionAdminDAL.GenerateExamSessionForCourse(session, adm, course);
        }
Esempio n. 2
0
 private void updateExamSessions()
 {
     sessions = ExamSessionDAL.SelectAll();
     if (sessions.Count != 0)
     {
         sessionsComboBox.Items.Clear();
         for (int i = 0; i < sessions.Count; i++)
         {
             ComboboxItem item = new ComboboxItem();
             item.Text  = sessions[i].Id.ToString();
             item.Value = sessions[i].Id;
             sessionsComboBox.Items.Add(item);
             sessionsComboBox.SelectedIndex = 0;
         }
     }
 }
Esempio n. 3
0
 public AssignStudentToExamSession()
 {
     InitializeComponent();
     students = StudentDAL.SelectAll();
     for (int i = 0; i < students.Count; i++)
     {
         ComboboxItem item = new ComboboxItem();
         item.Text  = students[i].Name;
         item.Value = students[i].Id;
         StudentsComboBox.Items.Add(item);
         StudentsComboBox.SelectedIndex = 0;
     }
     sessions = ExamSessionDAL.SelectAll();
     for (int i = 0; i < sessions.Count; i++)
     {
         ComboboxItem item = new ComboboxItem();
         item.Text  = sessions[i].Id.ToString();
         item.Value = sessions[i].Id;
         ExamSessionsComboBox.Items.Add(item);
         ExamSessionsComboBox.SelectedIndex = 0;
     }
 }
Esempio n. 4
0
 private void createExamSessionBtn_Click(object sender, EventArgs e)
 {
     ExamSessionDAL.Add(new DateTime(2017, 6, 27), adm, exams[ExamsComboBox.SelectedIndex].Id);
     updateExamSessions();
 }