Exemple #1
0
 public void Submit(List <string> errors)
 {
     foreach (string e in errors)
     {
         PopUpWindow.Display(e);
     }
 }
Exemple #2
0
 public void Submit(string courseNo, string section, string className,
                    int credits, string location, string instructor, DateTime timeStart,
                    DateTime timeEnd, DateTime startDate, DateTime endDate, string classDays)
 {
     if (db.DoesClassExist(courseNo, section))
     {
         PopUpWindow.Display("A class with course number: " + courseNo + " and section: " + section + " already exists.");
     }
     else
     {
         this.db.CreateClass(courseNo, section, className,
                             credits, location, instructor, timeStart,
                             timeEnd, startDate, endDate, classDays);
         classList.Update(db.GetClasses());
         createClassForm.ClearForm();
         PopUpWindow.Display("Class: " + courseNo + ", section: " + section + ", added!");
     }
 }
        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);
            }
        }