Beispiel #1
0
 /// <summary>
 /// Checks the GPA state change.
 /// </summary>
 /// <param name="student">A student.</param>
 public override void stateChangeCheck(Student student)
 {
     if (student.GradePointAverage < getInstance().LowerLimit)
     {
         student.GPAStateId = RegularState.getInstance().GPAStateId;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Gets Regular state instance.
        /// </summary>
        /// <returns>Regular state instance.</returns>
        public static RegularState getInstance()
        {
            if (_regularState == null)
            {
                _regularState = db.RegularStates.SingleOrDefault();
                if (_regularState == null)
                {
                    _regularState = new RegularState();
                    db.RegularStates.Add(_regularState);
                    db.SaveChanges();
                }
            }

            return(_regularState);
        }