private int GetWarehouseOrder(WarehouseConsumption arg)
        {
            var warehouse =
                _cacheService.GetWarehouses().SingleOrDefault(x => x.Id == arg.WarehouseId) ??
                Warehouse.Undefined;

            return(warehouse.SortOrder);
        }
예제 #2
0
        public void AddMissingItems(WarehouseConsumption whc)
        {
            var inventoryItems = _inventoryDao.GetInventoryItems();

            foreach (var inventoryItem in inventoryItems.Where(inventoryItem => whc.PeriodicConsumptionItems.All(x => x.InventoryItemId != inventoryItem.Id)))
            {
                whc.PeriodicConsumptionItems.Add(PeriodicConsumptionItem.Create(inventoryItem));
            }
        }
 public WarehouseConsumptionViewModel(WarehouseConsumption model, ICacheService cacheService, IInventoryService inventoryService)
 {
     _cacheService     = cacheService;
     _inventoryService = inventoryService;
     Model             = model;
 }
예제 #4
0
 public WarehouseConsumptionViewModel(WarehouseConsumption model, ICacheService cacheService)
 {
     _cacheService = cacheService;
     Model         = model;
 }