Пример #1
0
 private void PopulateComboBox1(StudentAccount student)
 {
     foreach (Class classRecord in this.classes)
     {
         if (!student.IsRegistered(classRecord))
         {
             this.listBox1.Items.Add(classRecord);
         }
     }
 }
Пример #2
0
        public void Register(string fullClassNo)
        {
            StudentAccount studentAccount = (StudentAccount)this.accountController.GetLoggedInUser();

            // Check if user is already registered.
            if (fullClassNo == "")
            {
                PopUpWindow.Display("Please select a class for which to register.");
            }
            else if (studentAccount.IsRegistered(db.GetClass(fullClassNo)))
            {
                PopUpWindow.Display("Already registred for " + fullClassNo + ".");
            }
            else
            {
                studentAccount = db.Register(fullClassNo, studentAccount);
                this.registerForm.UpdateForm(studentAccount);
                this.classWorksheet.Update(studentAccount);
            }
        }