Пример #1
0
        public ActionResult Inventory(DateTime min, DateTime max, int dayReq, int categoryId)
        {
            InventoryByCategoryModel ibcm = new InventoryByCategoryModel();
            CakesPosRepository       cpr  = new CakesPosRepository(_connectionString);

            ibcm.inventory   = cpr.GetInventory(min, max).Where(c => c.product.CategoryId == categoryId);
            ibcm.categories  = cpr.GetAllCategories();
            ViewBag.category = categoryId;
            ViewBag.minDate  = min;
            ViewBag.maxDate  = max;
            ViewBag.dayReq   = dayReq;
            return(View(ibcm));
        }
Пример #2
0
        public ActionResult Inventory()
        {
            DateTime min = DateTime.Now.Date.AddMonths(-1);
            DateTime max = DateTime.Now.Date.AddDays(3);
            InventoryByCategoryModel ibcm = new InventoryByCategoryModel();
            CakesPosRepository       cpr  = new CakesPosRepository(_connectionString);

            ibcm.inventory   = cpr.GetInventory(min, max);
            ibcm.categories  = cpr.GetAllCategories();
            ViewBag.category = 1;
            ViewBag.minDate  = min;
            ViewBag.maxDate  = max;
            ViewBag.dayReq   = 4;
            return(View(ibcm));
        }