예제 #1
0
 public static ShortAnnouncementGradeViewData Create(ClassAnnouncement announcement,
                                                     IList <StudentAnnouncement> studentAnnouncements, int studentId, IList <ClaimInfo> claims)
 {
     return(new ShortAnnouncementGradeViewData(announcement, claims)
     {
         StudentAnnouncements = ShortStudentsAnnouncementsViewData.Create(studentAnnouncements, studentId)
     });
 }
예제 #2
0
 public static ShortAnnouncementGradeViewData Create(ClassAnnouncement announcement,
                                                     IList <StudentAnnouncementDetails> studentAnnouncements, IList <int> studentIds, IList <ClaimInfo> claims)
 {
     studentAnnouncements = studentAnnouncements.Where(x => x.AnnouncementId == announcement.Id).ToList();
     return(new ShortAnnouncementGradeViewData(announcement, claims)
     {
         StudentAnnouncements = ShortStudentsAnnouncementsViewData.Create(studentAnnouncements, studentIds)
     });
 }
예제 #3
0
        public static ShortStudentsAnnouncementsViewData Create(IList <StudentAnnouncement> studentAnnouncements, int studentId)
        {
            var res = new ShortStudentsAnnouncementsViewData {
                Items = new List <ShortStudentAnnouncementViewData>()
            };
            var stAnn = studentAnnouncements.FirstOrDefault(x => x.StudentId == studentId);

            if (stAnn != null)
            {
                res.Items.Add(ShortStudentAnnouncementViewData.Create(stAnn));
            }
            return(res);
        }