コード例 #1
0
        protected override void InitializeCollectionComplexProperties(ParameterGroup model)
        {
            if (model.Parameters == null)
            {
                throw new ArgumentException("Parameters cannot be null");
            }
            Parameters = new ValidatableChangeTrackingCollection <ParameterWrapper>(model.Parameters.Select(e => GetWrapper <ParameterWrapper, Parameter>(e)));
            RegisterCollection(Parameters, model.Parameters);

            if (model.Measures == null)
            {
                throw new ArgumentException("Measures cannot be null");
            }
            Measures = new ValidatableChangeTrackingCollection <MeasureWrapper>(model.Measures.Select(e => GetWrapper <MeasureWrapper, Measure>(e)));
            RegisterCollection(Measures, model.Measures);
        }
コード例 #2
0
        protected override void InitializeCollectionComplexProperties(SalesUnit model)
        {
            if (model.ChildSalesUnits == null)
            {
                throw new ArgumentException("ChildSalesUnits cannot be null");
            }
            ChildSalesUnits = new ValidatableChangeTrackingCollection <SalesUnitWrapper>(model.ChildSalesUnits.Select(e => GetWrapper <SalesUnitWrapper, SalesUnit>(e)));
            RegisterCollection(ChildSalesUnits, model.ChildSalesUnits);

            if (model.TenderUnits == null)
            {
                throw new ArgumentException("TenderUnits cannot be null");
            }
            TenderUnits = new ValidatableChangeTrackingCollection <TenderUnitWrapper>(model.TenderUnits.Select(e => GetWrapper <TenderUnitWrapper, TenderUnit>(e)));
            RegisterCollection(TenderUnits, model.TenderUnits);

            if (model.OfferUnits == null)
            {
                throw new ArgumentException("OfferUnits cannot be null");
            }
            OfferUnits = new ValidatableChangeTrackingCollection <OfferUnitWrapper>(model.OfferUnits.Select(e => GetWrapper <OfferUnitWrapper, OfferUnit>(e)));
            RegisterCollection(OfferUnits, model.OfferUnits);

            if (model.PaymentsConditions == null)
            {
                throw new ArgumentException("PaymentsConditions cannot be null");
            }
            PaymentsConditions = new ValidatableChangeTrackingCollection <PaymentConditionWrapper>(model.PaymentsConditions.Select(e => GetWrapper <PaymentConditionWrapper, PaymentCondition>(e)));
            RegisterCollection(PaymentsConditions, model.PaymentsConditions);

            if (model.PaymentsPlanned == null)
            {
                throw new ArgumentException("PaymentsPlanned cannot be null");
            }
            PaymentsPlanned = new ValidatableChangeTrackingCollection <PaymentPlanWrapper>(model.PaymentsPlanned.Select(e => GetWrapper <PaymentPlanWrapper, PaymentPlan>(e)));
            RegisterCollection(PaymentsPlanned, model.PaymentsPlanned);

            if (model.PaymentsActual == null)
            {
                throw new ArgumentException("PaymentsActual cannot be null");
            }
            PaymentsActual = new ValidatableChangeTrackingCollection <PaymentActualWrapper>(model.PaymentsActual.Select(e => GetWrapper <PaymentActualWrapper, PaymentActual>(e)));
            RegisterCollection(PaymentsActual, model.PaymentsActual);
        }
コード例 #3
0
        protected override void InitializeCollectionComplexProperties(Tender model)
        {
            if (model.Participants == null)
            {
                throw new ArgumentException("Participants cannot be null");
            }
            Participants = new ValidatableChangeTrackingCollection <CompanyWrapper>(model.Participants.Select(e => GetWrapper <CompanyWrapper, Company>(e)));
            RegisterCollection(Participants, model.Participants);

            if (model.TenderUnits == null)
            {
                throw new ArgumentException("TenderUnits cannot be null");
            }
            TenderUnits = new ValidatableChangeTrackingCollection <TenderUnitWrapper>(model.TenderUnits.Select(e => GetWrapper <TenderUnitWrapper, TenderUnit>(e)));
            RegisterCollection(TenderUnits, model.TenderUnits);

            if (model.Offers == null)
            {
                throw new ArgumentException("Offers cannot be null");
            }
            Offers = new ValidatableChangeTrackingCollection <OfferWrapper>(model.Offers.Select(e => GetWrapper <OfferWrapper, Offer>(e)));
            RegisterCollection(Offers, model.Offers);
        }
コード例 #4
0
        protected override void InitializeCollectionComplexProperties(Product model)
        {
            if (model.ChildProducts == null)
            {
                throw new ArgumentException("ChildProducts cannot be null");
            }
            ChildProducts = new ValidatableChangeTrackingCollection <ProductWrapper>(model.ChildProducts.Select(e => GetWrapper <ProductWrapper, Product>(e)));
            RegisterCollection(ChildProducts, model.ChildProducts);

            if (model.Parameters == null)
            {
                throw new ArgumentException("Parameters cannot be null");
            }
            Parameters = new ValidatableChangeTrackingCollection <ParameterWrapper>(model.Parameters.Select(e => GetWrapper <ParameterWrapper, Parameter>(e)));
            RegisterCollection(Parameters, model.Parameters);

            if (model.Prices == null)
            {
                throw new ArgumentException("Prices cannot be null");
            }
            Prices = new ValidatableChangeTrackingCollection <SumOnDateWrapper>(model.Prices.Select(e => GetWrapper <SumOnDateWrapper, SumOnDate>(e)));
            RegisterCollection(Prices, model.Prices);
        }
コード例 #5
0
        protected override void InitializeCollectionComplexProperties(Company model)
        {
            if (model.ChildCompanies == null)
            {
                throw new ArgumentException("ChildCompanies cannot be null");
            }
            ChildCompanies = new ValidatableChangeTrackingCollection <CompanyWrapper>(model.ChildCompanies.Select(e => GetWrapper <CompanyWrapper, Company>(e)));
            RegisterCollection(ChildCompanies, model.ChildCompanies);

            if (model.ActivityFilds == null)
            {
                throw new ArgumentException("ActivityFilds cannot be null");
            }
            ActivityFilds = new ValidatableChangeTrackingCollection <ActivityFieldWrapper>(model.ActivityFilds.Select(e => GetWrapper <ActivityFieldWrapper, ActivityField>(e)));
            RegisterCollection(ActivityFilds, model.ActivityFilds);

            if (model.Employees == null)
            {
                throw new ArgumentException("Employees cannot be null");
            }
            Employees = new ValidatableChangeTrackingCollection <EmployeeWrapper>(model.Employees.Select(e => GetWrapper <EmployeeWrapper, Employee>(e)));
            RegisterCollection(Employees, model.Employees);
        }