Exemplo n.º 1
0
        void LoadAllItems()
        {
            btnBuildIndexer.Enabled = false;
            var allstockouts = _repository.GetAll().LastOrDefault();

            if (allstockouts != null)
            {
                lbllastindexedtime.Text = allstockouts.LastIndexedTime.ToString();
            }
            var allItems = receiveDocRepository.RecievedItems().Select(m => m.Item).Distinct().ToList();

            itemsBindingSource.DataSource = ItemViewModelCollection.Create(allItems);
            var allstores = _storerepository.AllStores();

            storebindingSource.DataSource = allstores;
        }
Exemplo n.º 2
0
        public void BuildDOS(bool forceCalc = false)
        {
            if ((IsCalculatedToday()) && (forceCalc == false))
            {
                return;
            }

            _stockoutRepository.DeleteAll();

            var allstores = _storerepository.AllStores();

            foreach (var store in allstores)
            {
                var allItems  = receiveDocRepository.RecievedItems().Where(x => x.StoreID == store.ID).Select(m => m.Item).Distinct().ToList();
                var itemsList = ItemViewModelCollection.Create(allItems);

                foreach (var item in itemsList)
                {
                    StockoutIndexBuilder.Builder.BuildIndex(item.ItemId, store.ID);
                    item.Indexed = true;
                }
            }
        }
Exemplo n.º 3
0
        void LoadAllItems()
        {
            var allItems = _repository.AllItems().Where(m => m.ID < 500);

            itemsBindingSource.DataSource = ItemViewModelCollection.Create(allItems);
        }