private void DropStudent()
        {
            var theStudent = SelectedEnrolledStudent;

            SelectedSection.StudentIds.Remove(theStudent.Id);
            mDataService.Save();

            NonEnrolledStudents.Add(theStudent);
            EnrolledStudents.Remove(theStudent);

            SelectedNonEnrolledStudent = theStudent;
        }
示例#2
0
  //**************************************
  //	
  public bool Drop(Student s) {
    // We may only drop a student if he/she is enrolled.

    if (!s.IsEnrolledIn(this)) {
      return false;
    }  
    else {
      // Find the student in our Dictionary, and remove it.

      EnrolledStudents.Remove(s.Id);

      // Note bidirectionality.

      s.DropSection(this);
      return true;
    }
  }