Exemplo n.º 1
0
        public ViewAdsViewModel(DateTime?start, DateTime?end)
        {
            this.ShowLeaderboardAd = false;
            DateTime now = DateTime.Now;

            this.Start       = start ?? new DateTime(now.Year, now.Month, 1);
            this.End         = end ?? new DateTime(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month));
            this.impressions = StoredProcs
                               .AdImpressions_GetImpressions(this.Start, this.End)
                               .Execute()
                               .OrderBy(i => i.Impression_Date)
                               .ThenBy(i => i.Banner_Name);
        }