Example #1
0
        //
        // GET: /BottomLine/

        public ActionResult BottomLine()
        {
            MoneyMadeManager mm = new MoneyMadeManager();
            RoutesEvents     re = new RoutesEvents();
            BottomLine       bl = new BottomLine();

            bl.EventTotal = mm.GetTotalEvents();
            bl.RouteTotal = mm.GetTotalRoute();


            MoneySpentManager ms = new MoneySpentManager();
            ExpenseTotal      et = new ExpenseTotal();

            bl.TotalExpenses    = ms.GetTotalExpenses();
            bl.FinalAmount      = (bl.EventTotal + bl.RouteTotal) - bl.TotalExpenses;
            bl.ProfitPercentage = bl.FinalAmount / (bl.EventTotal + bl.RouteTotal) * 100;

            BottomLineManager blm = new BottomLineManager();

            bl.TotalSpentOnInventory = blm.GetTotalSpentOnInventory("Ices", "Kliens", "Paper Goods", "Cones", "Toppings");
            var amountWithoutInventory = (bl.EventTotal + bl.RouteTotal) - blm.GetTotalSpentOnInventory("Ices", "Kliens", "Paper Goods", "Cones", "Toppings");

            bl.ProfitPercentageFromAmountSpentOnInventory = amountWithoutInventory / (bl.EventTotal + bl.RouteTotal) * 100;
            return(View(bl));
        }
        public ActionResult MoneyMade()
        {
            MoneyMadeManager mm = new MoneyMadeManager();
            RoutesEvents     re = new RoutesEvents();

            re.Routes       = mm.GetRoutes();
            re.Events       = mm.GetEvents();
            re.EventsAmount = mm.GetTotalEvents();
            re.RoutesAmount = mm.GetTotalRoute();
            return(View(re));
        }