Exemple #1
0
        public void PrintInventory(int id)
        {
            var listLocationModel = DAL.GetInventory(id);

            Console.WriteLine($"----------\nInventory for Store ID {id}");
            listLocationModel.ForEach(item =>
            {
                Console.WriteLine($"Name:{item.P.Name,20} ID:{item.Id,5} Quantity:{item.Qty,8} Price:{item.P.Price,10}");
            });
            Console.WriteLine("----------");
        }
Exemple #2
0
        /// <summary>
        /// Gets inventory for a location to display hwen adding order items
        /// </summary>
        /// <param name="storeID"></param>
        /// <returns></returns>
        private CreateOrderViewModel InitCOVM(int storeID)
        {
            TempData["StoreID"] = storeID;
            var inventoryItemModel = new CreateOrderViewModel
            {
                Inventory = _locContext.GetInventory(storeID)
            };

            ViewData["Pid"] = new SelectList(_locContext.GetInventory(storeID), "Id", "P.Name");
            return(inventoryItemModel);
        }