Ejemplo n.º 1
0
        public void Execute(object parameter)
        {
            if (!entry.Number.StartsWith("2") || entry.Number.Equals("203"))
            {
                MessageBox.Show("You can't add " + entry.Department + " " + entry.Number + " to Schedule as you do not have the prerequisites.");
                return;
            }

            CartSelections.RemoveFromCart(entry);
            entry.UpdateRemoveFromSchedule();
            ScheduleSelections.AddToSchedule(entry);
            Messages.AddUndoMessage("Moved " + entry.Department + " " + entry.Number + " in " + entry.Semester + " to Schedule", () => reverseEnroll(entry));
        }
Ejemplo n.º 2
0
        public void Execute(object parameter)
        {
            Offering selected = course.SelectedOffering();

            if (selected != null)
            {
                CourseSelectorCourses.RemoveCourse(course);
                CartAndScheduleEntry entry = CartSelections.AddToCart(course);
                Messages.AddUndoMessage("Added " + course.Department + " " + course.Number + " in " + entry.Semester + " to Cart", () => CartSelections.RemoveFromCart(entry));
            }
            else
            {
                MessageBox.Show("Please ensure all sections (lecture/tutorial/lab) are selected for the course you wish to add");
            }
        }
Ejemplo n.º 3
0
 public void reverseEnroll(CartAndScheduleEntry entry)
 {
     entry.UpdateRemoveFromCart();
     CartSelections.AddToCart(entry);
     ScheduleSelections.RemoveFromSchedule(entry);
 }
 public void Execute(object parameter)
 {
     CartSelections.RemoveFromCart(entry);
     Messages.AddUndoMessage("Removed " + entry.Department + " " + entry.Number + " in " + entry.Semester + " from Cart", () => CartSelections.AddToCart(entry));
 }