Beispiel #1
0
        public ActionResult Chargeback(string year, string month, string category)
        {
            AnalyticsListVM analytics;

            if (Session["Analytics"] == null)
            {
                UnitOfWork uow = new UnitOfWork();
                analytics            = new AnalyticsListVM(uow);
                Session["Analytics"] = analytics;
            }
            else
            {
                analytics = (AnalyticsListVM)Session["Analytics"];
            }
            //List<AnalyticsDetailsVM> data = analytics.DLSummaryList;
            List <AnalyticsDetailsVM> data = (List <AnalyticsDetailsVM>)Session["Data"];
            string result = year;

            //filter by year
            data = AnalyticsService.ApplyFilter(data, "Year", year);

            if (month != "all")
            {
                result = int.Parse(month).ToString($"{0:00}") + "/" + result;
                data   = AnalyticsService.ApplyFilter(data, "Month", month);
            }
            if (category != "all")
            {
                result = " Category " + category + " in " + result;
                data   = AnalyticsService.ApplyFilter(data, "Category", category);
            }
            data           = AnalyticsService.ApplyGroup(data, "Department");
            ViewBag.Result = result;
            return(View(data));
        }
Beispiel #2
0
        public ActionResult Disbursements()
        {
            AnalyticsListVM analytics;

            if (Session["Analytics"] == null)
            {
                UnitOfWork uow = new UnitOfWork();
                analytics            = new AnalyticsListVM(uow);
                Session["Analytics"] = analytics;
            }
            else
            {
                analytics = (AnalyticsListVM)Session["Analytics"];
            }

            Session["Data"] = analytics.DLSummaryList;
            ViewBag.Mode    = "Completed Disbursements";
            return(View("Index"));
        }
Beispiel #3
0
        // GET: Analytics
        public ActionResult Requisitions()
        {
            AnalyticsListVM analytics;

            if (Session["Analytics"] == null)
            {
                UnitOfWork uow = new UnitOfWork();
                analytics            = new AnalyticsListVM(uow);
                Session["Analytics"] = analytics;
            }
            else
            {
                analytics = (AnalyticsListVM)Session["Analytics"];
            }
            Session["Data"] = analytics.ROSummaryList;
            ViewBag.Mode    = "Requisition Orders";

            return(View("Index"));
        }