using System; using System.Collections.Generic; using System.Linq; using BeWo.Data.Entities; using BS.Shared; using BS.Shared.DataContracts; namespace BeWo.Report.ReportObjects { public class NotizenRO : AbstractBeWoReportObject { public List Eintraege { get; set; } public DateTime Start { get; set; } public DateTime End { get; set; } public static NotizenRO Create(DateTime start, DateTime end, NotizenKategorieDC notizenKategorie) { var ro = new NotizenRO(); ro.Start = start; ro.End = end; ro.Eintraege = notizenKategorie.NotizenEintraege .Where(w => w.Datum != null && w.Datum.Value >= start && w.Datum.Value <= end) .OrderBy(o => o.Datum).ToList(); return ro; } } }