private int GetWarehouseOrder(WarehouseConsumption arg) { var warehouse = _cacheService.GetWarehouses().SingleOrDefault(x => x.Id == arg.WarehouseId) ?? Warehouse.Undefined; return(warehouse.SortOrder); }
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; }
public WarehouseConsumptionViewModel(WarehouseConsumption model, ICacheService cacheService) { _cacheService = cacheService; Model = model; }