Пример #1
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
            });
        }