public void RemoveSchool(string DAN) { if (FirstChoice != null) { if (FirstChoice.DAN == DAN) { FirstChoice = null; } } if (SecondChoice != null) { if (SecondChoice.DAN == DAN) { SecondChoice = null; } } if (ThirdChoice != null) { if (ThirdChoice.DAN == DAN) { ThirdChoice = null; } } shiftUp(); }
public void RemoveSchool(SelectedSchool School) { if (School != null) { RemoveSchool(School.DAN); } }
private void shiftUp() { if ((SecondChoice == null) && (ThirdChoice != null)) { SecondChoice = ThirdChoice; ThirdChoice = null; } if ((FirstChoice == null) && (SecondChoice != null)) { FirstChoice = SecondChoice; SecondChoice = null; } }
public void AddSchool(School school) { if (school != null) { // Check if the school is already added if (FirstChoice != null) { if (FirstChoice.DAN == school.DAN) { return; } } if (SecondChoice != null) { if (SecondChoice.DAN == school.DAN) { return; } } if (ThirdChoice != null) { if (ThirdChoice.DAN == school.DAN) { return; } } // Add in first available spot if (FirstChoice == null) { FirstChoice = new SelectedSchool(school); } else if (SecondChoice == null) { SecondChoice = new SelectedSchool(school); } else if (ThirdChoice == null) { ThirdChoice = new SelectedSchool(school); } shiftUp(); } }