Пример #1
0
        private async void Reload()
        {
            looper.Show(this);
            await Keeper.Refresh();

            source.DataSource  = Keeper.Items;
            dgItems.DataSource = source;
            source.ResetBindings(false);
            looper.Hide();
            page = 1;
        }
Пример #2
0
        private async Task LoadAllData()
        {
            List <Task> tasks        = new List <Task>();
            Task        partsLoad    = Task.Run(() => PartKeeper.Refresh());
            Task        storagesLoad = Task.Run(() => StorageBinKeeper.Refresh());

            tasks.Add(partsLoad);
            tasks.Add(storagesLoad);
            if (StorageBin != null)
            {
                tasks.Add(Task.Run(() => StockTakingKeeper.Refresh()));
            }
            await Task.WhenAll(tasks);
        }