Esempio n. 1
0
        public void RefreshStockItems()
        {
            Modified = false;
            StockItemsCollection.Clear();
            RemovedStockItemsList.Clear();

            Worker.EnqueueTask(new WorkerTask((args) =>
            {
                try
                {
                    using (var proxy = new WorkChannel())
                    {
                        return proxy.GetIngredients(new EmptyRequest
                        {
                            Login = ClientConfig.CurrentUser.Email,
                            Password = ClientConfig.CurrentUser.Password
                        });
                    }
                }
                catch (Exception exc)
                {
                    Console.WriteLine(exc.Message);
                    return exc;
                }
            }, PostData, null));
        }