Beispiel #1
0
        public IBaseOperation LoadEnumData()
        {
            List <IBaseOperation> loadOperations = new List <IBaseOperation>();

            Operation <List <LineCalcType> > op_LineCalcType = OperationHandler.GetLineCalcTypes();

            loadOperations.Add(op_LineCalcType);
            Operation <List <ItemType> > op_ItemTypes = OperationHandler.GetItemTypes();

            loadOperations.Add(op_ItemTypes);
            Operation <List <CardType> > op_CardTypes = OperationHandler.GetCardTypes();

            loadOperations.Add(op_CardTypes);
            Operation <List <Currency> > op_Currencies = OperationHandler.GetCurrencies();

            loadOperations.Add(op_Currencies);
            Operation <List <CashType> > op_CashTypes = OperationHandler.GetCashTypes();

            loadOperations.Add(op_CashTypes);
            Operation <List <DocumentStatusType> > op_DocumentStatusTypes = OperationHandler.GetDocumentStatusTypes();

            loadOperations.Add(op_DocumentStatusTypes);
            Operation <List <DocumentMaster> > op_DocumentMasters = OperationHandler.GetDocumentMasters();

            loadOperations.Add(op_DocumentMasters);

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


            LineCalcTypes       = op_LineCalcType.Value;
            ItemTypes           = op_ItemTypes.Value;
            CardTypes           = op_CardTypes.Value;
            Currencies          = op_Currencies.Value;
            CashTypes           = op_CashTypes.Value;
            DocumentStatusTypes = op_DocumentStatusTypes.Value;
            DocumentTypes       = op_DocumentMasters.Value;
            return(new BaseOperation {
                Successful = true
            });
        }