public string TestConstraint(StudentConstraint c)
 {
     string s = "Value of WeekDay is: " + c.Day.ToLower() + "\n";
     s += "startHour: " + c.StartHour + "\n";
     s += "startMinute: " + c.StartMinute + "\n";
     s += "endHour: " + c.EndHour + "\n";
     s += "endMinute: " + c.EndMinute + "\n";
     return s;
 }
Beispiel #2
0
        private bool HasDay(StudentConstraint c, Section s)
        {
            string day1 = "TBA";
            string day2 = "TBA";

            System.Diagnostics.Debug.WriteLine("Section Day is: " + s.Day);
            if (s.Day.Length > 3)
            {
                day1 = FormatDay(s.Day.Substring(0, 2)).ToLower();
                day2 = FormatDay(s.Day.Substring(2, 2)).ToLower();
            }
            else
            {
                day1 = FormatDay(s.Day).ToLower();
            }

            System.Diagnostics.Debug.WriteLine("Comparing: " + c.Day + " to " + day1 + " and " + day2);

            if (c.Day == day1)
                return true;

            if (c.Day == day2)
                return true;

            return false;
        }