示例#1
0
 private void SetupAvailableUnits()
 {
     for (int i = 0; i < 4; i++)
     {
         AvalibleUnits.Add(new AddUnit(this.SemesterID));
     }
 }
示例#2
0
 public void EnrollInUnit(Unit unit)
 {
     if (AvalibleUnits.Count > 0)
     {
         EnrolledUnits.Add(unit);
         AvalibleUnits.RemoveAt(0);
         NewUnit.RemoveUnit(unit);
     }
 }
示例#3
0
        public void UnEnrollInUnit(Unit unit)
        {
            int unitIndex = Unit.GetUnitIndex(EnrolledUnits, unit);

            if (unitIndex != -1)
            {
                EnrolledUnits.Remove(unit);
                AvalibleUnits.Add(new AddUnit(this.SemesterID));

                NewUnit.AddUnit(unit);
            }
        }