Esempio n. 1
0
 public CourseModel(Course c)
 {
     CourseNo_Dept      = c.CourseNo_Dept;
     CourseNo_Id        = c.CourseNo_Id;
     Course_Name        = c.Course_Name;
     Credits            = c.Credits;
     GeneralComponent   = new CourseComponentsModel(c.GeneralClass);
     PracticalComponent = new CourseComponentsModel(c.PracticalClass);
     TutorialComponent  = new CourseComponentsModel(c.TutorialClass);
     CompreTiming       = c.CompreTiming;
 }
Esempio n. 2
0
        public bool IsClashing(CourseComponentsModel ccm)
        {
            if (ccm.SelectedModel == null)
            {
                return(false);
            }

            int ClashCount = 0;

            foreach (var x in from a in lst select new TimingMap(a.ClassTiming))
            {
                if (TimingMap.Clash(x, new TimingMap(ccm.SelectedModel.ClassTiming)))
                {
                    ++ClashCount;
                }
            }

            return(ClashCount > 1);
        }