public ViewResult Statistics() { QMail qmail = new QMail(); DateTime[] dateTimes = { DateTime.Now.Subtract(new TimeSpan(1, 0, 0)), DateTime.Now.Subtract(new TimeSpan(4, 0, 0)), DateTime.Now.Subtract(new TimeSpan(12, 0, 0)), DateTime.Now.Subtract(new TimeSpan(24, 0, 0)), DateTime.Now.Subtract(new TimeSpan(2*24, 0, 0)), DateTime.Now.Subtract(new TimeSpan(7*24, 0, 0)), DateTime.Now.Subtract(new TimeSpan(14*24, 0, 0)), DateTime.Now.Subtract(new TimeSpan(30*24, 0, 0)), DateTime.Now.Subtract(new TimeSpan(60*24, 0, 0)) }; return View(qmail.MailsSince(dateTimes)); /* List<MailStatistics> statistics = new List<MailStatistics>(); foreach (MailsStat stat in stats) { MailStatistics s = new MailStatistics(); s.since = stat.SinceDate; s.stats["Created"] = stat.Created; s.stats["Sent"] = stat.Sent; s.stats["Failed"] = stat.Failed; s.stats["Archived"] = stat.Archived; statistics.Add(s); } return View(statistics.ToList()); */ }