예제 #1
0
        public static DTO.PricingKeyPriceListRule ToDto(this Display.PricingKeyPriceListRule displayEntity)
        {
            List <DTO.PriceRoundingRule> roundingRules = displayEntity.RoundingRules.ToDtoList();
            List <DTO.SQLEnumeration>    roundingTypes = displayEntity.RoundingTypes.ToDTOList();

            var dto = new DTO.PricingKeyPriceListRule(
                displayEntity.PriceListId,
                displayEntity.DollarRangeLower,
                displayEntity.DollarRangeUpper,
                roundingRules, roundingTypes);

            return(dto);
        }
예제 #2
0
        public static Display.PricingKeyPriceListRule ToDisplayEntity(this DTO.PricingKeyPriceListRule dto)
        {
            var displayEntity = new Display.PricingKeyPriceListRule();

            displayEntity.PriceListId      = dto.PriceListId;
            displayEntity.DollarRangeLower = dto.DollarRangeLower;
            displayEntity.DollarRangeUpper = dto.DollarRangeUpper;

            if (dto.RoundingRules != null)
            {
                displayEntity.RoundingRules = dto.RoundingRules.ToDisplayList();
            }

            return(displayEntity);
        }
예제 #3
0
        public PricingEveryday()
        {
            Identity             = new PricingIdentity();
            FilterGroups         = new ReactiveList <FilterGroup>();
            ValueDrivers         = new ReactiveList <PricingEverydayValueDriver>();
            KeyValueDriver       = new PricingEverydayKeyValueDriver();
            LinkedValueDrivers   = new ObservableCollection <PricingEverydayLinkedValueDriver>();
            PricingModes         = new List <PricingMode>();
            PriceListGroups      = new List <PricingEverydayPriceListGroup>();
            KeyPriceListRule     = new PricingKeyPriceListRule();
            LinkedPriceListRules = new List <PricingLinkedPriceListRule>();
            Results = new List <PricingEverydayResult>();

            _valueDriversCache = new List <PricingEverydayValueDriverWrapper>();

            ValueDrivers.ChangeTrackingEnabled = true;
            _valueDriverChangeListener         = ValueDrivers.ItemChanged.Subscribe(driver => OnValueDriverItemChanged(driver));
        }