Esempio n. 1
0
        private void RefreshData()
        {
            Operation <List <ItemView> > op_Items = OperationHandler.GetItems();

            if (op_Items.Successful)
            {
                gcData.DataSource = op_Items.Value;
            }
            else
            {
                // Show Error
            }
        }
Esempio n. 2
0
        private void RefreshItemPriceData()
        {
            Operation <List <ItemView> > op_itprs_def = OperationHandler.GetItems();

            if (op_itprs_def.Successful)
            {
                gcByItems.DataSource = op_itprs_def.Value;
            }
            else
            {
                // Show Error
            }
        }
Esempio n. 3
0
        public IBaseOperation LoadMasterData()
        {
            List <IBaseOperation> loadOperations = new List <IBaseOperation>();
            //Operation<List<EnumMaster>> op_ItemTypes = OperationHandler.GetEnums(3);
            //loadOperations.Add(op_ItemTypes);
            Operation <List <ItemView> > op_Items = OperationHandler.GetItems();

            loadOperations.Add(op_Items);
            //Operation<List<ExchangeMaster>> op_ExchangeMaster = OperationHandler.GetAllExchanges();
            //loadOperations.Add(op_ExchangeMaster);
            Operation <List <CardView> > op_CardMaster = OperationHandler.GetCards();

            loadOperations.Add(op_CardMaster);
            Operation <List <Warehouse> > op_Warehouses = OperationHandler.GetWarehouses();

            loadOperations.Add(op_Warehouses);

            //Operation<List<WarehouseMaster>> op_Warehouses = OperationHandler.GetWarehouses();
            //loadOperations.Add(op_Warehouses);
            //Operation<List<ItemPrice>> op_ItemPrices = OperationHandler.GetItemPricesList();
            //loadOperations.Add(op_ItemPrices);
            //Operation<List<DocumentMaster>> op_DocumentMasters = OperationHandler.GetDocumentMasters();
            //loadOperations.Add(op_DocumentMasters);


            //foreach (IBaseOperation ibop in loadOperations)
            //{
            //    if (!ibop.Successful)
            //    {
            //        return ibop;
            //    }
            //}

            Items      = op_Items.Value;
            Cards      = op_CardMaster.Value;
            Warehouses = op_Warehouses.Value;
            //ItemPrices = op_ItemPrices.Value;
            //DocumentMasters = op_DocumentMasters.Value;
            //PriceCalcTypes = op_PriceCalcTypes.Value;



            return(new BaseOperation {
                Successful = true
            });
        }