コード例 #1
0
        private List <CAReportItem> GetClosedChildAbductions(DateTime start, DateTime end)
        {
            List <CAReportItem>   results   = new List <CAReportItem>();
            List <ChildAbduction> activeCAs = db.ChildAbductions.Where(c => c.caseStatusID == 3 && c.resultDate >= start && c.resultDate <= end).OrderBy(c1 => c1.resultDate).ToList();

            foreach (ChildAbduction c in activeCAs)
            {
                CAReportItem i = new CAReportItem();
                i.tipstaffRecordID = c.tipstaffRecordID;
                i.UniqueRecordID   = c.UniqueRecordID;
                i.DateCirculated   = c.sentSCD26;
                i.ClosedDate       = c.resultDate;
                i.children         = c.children;
                i.respondents      = c.Respondents;
                i.NPO = c.NPO;
                results.Add(i);
            }
            return(results);
        }
コード例 #2
0
        private List <CAReportItem> GetActiveChildAbductions()
        {
            List <CAReportItem>   results   = new List <CAReportItem>();
            List <ChildAbduction> activeCAs = db.ChildAbductions.Where(c => c.caseStatusID == 1 || c.caseStatusID == 2).ToList();

            foreach (ChildAbduction c in activeCAs)
            {
                CAReportItem i = new CAReportItem();
                i.tipstaffRecordID = c.tipstaffRecordID;
                i.UniqueRecordID   = c.UniqueRecordID;
                i.DateCirculated   = c.sentSCD26;
                i.ClosedDate       = null;
                i.children         = c.children;
                i.respondents      = c.Respondents;
                i.NPO = c.NPO;
                results.Add(i);
            }
            return(results);
        }