Exemple #1
0
        public ActionResult Index(DateTime date1, DateTime date2)
        {
            SalesBL salesBL      = new SalesBL();
            decimal total_profit = 0.0M;
            Dictionary <string, decimal> top5ItemTypes = new Dictionary <string, decimal>();

            top5ItemTypes         = salesBL.GetTop5ProfitableItemTypes(date1, date2);
            total_profit          = salesBL.GetTotalProfitMade(date1, date2);
            ViewBag.DateRange     = $"DateRange Results From: {date1.ToString("dd-MMM-yyyy")} To: {date2.ToString("dd-MMM-yyyy")}";
            ViewBag.Top5ItemTypes = top5ItemTypes;
            ViewBag.TotalProfit   = total_profit.ToString("#,###.00");

            return(View());
        }