Files
BeWoPlaner/Report/ReportObjects/NotizenRO.cs
2019-08-09 16:40:41 +02:00

35 lines
879 B
C#

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<NotizenRO>
{
public List<NotizenEintragDC> 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;
}
}
}