Beispiel #1
0
        static public TeenReport GetTeenReport()
        {
            TeenReport  ret         = new TeenReport();
            List <Teen> lstAllteens = GetAllTeens();

            var AllGuests = lstAllteens.Where(x => !string.IsNullOrEmpty(x.GuestOf)).ToList();

            for (int dx = 0; dx < DateList.Count; dx++)
            {
                DateTime d            = DateList[dx];
                var      AllAttenders = lstAllteens.Where(x => x.LstAttended[dx]).ToList();
                ret.lstNightTotals.Add(AllAttenders.Count());
                ret.lstGuestTotals.Add(AllGuests.Where(x => x.LstAttended[dx]).Count());
                AllGuests.RemoveAll(x => x.LstAttended[dx]);  // Remove the guests from the guest list so they are not double counted.. :)
            }

            return(ret);
        }
Beispiel #2
0
        public static TeenReport GetTeenReport()
        {
            TeenReport ret = new TeenReport();
            List<Teen> lstAllteens = GetAllTeens();

            var AllGuests = lstAllteens.Where(x => !string.IsNullOrEmpty(x.GuestOf)).ToList();

            for (int dx = 0; dx < DateList.Count; dx++)
            {
                DateTime d = DateList[dx];
                var AllAttenders = lstAllteens.Where(x => x.LstAttended[dx]).ToList();
                ret.lstNightTotals.Add(AllAttenders.Count());
                ret.lstGuestTotals.Add(AllGuests.Where(x => x.LstAttended[dx]).Count());
                AllGuests.RemoveAll(x => x.LstAttended[dx]);  // Remove the guests from the guest list so they are not double counted.. :)
            }

            return ret;
        }