Example #1
0
        public static Display.PricingEverydayPriceListGroup ToDisplayEntity(this DTO.PricingEverydayPriceListGroup dto)
        {
            var displayEntity = new Display.PricingEverydayPriceListGroup();

            displayEntity.Key   = dto.Key;
            displayEntity.Name  = dto.Name;
            displayEntity.Title = dto.Title;
            displayEntity.Sort  = dto.Sort;

            if (dto.PriceLists != null)
            {
                dto.PriceLists.ForEach(item => displayEntity.PriceLists.Add(item.ToDisplayEntity()));
            }
            return(displayEntity);
        }
Example #2
0
        public static DTO.PricingEverydayPriceListGroup ToDto(this Display.PricingEverydayPriceListGroup displayEntity)
        {
            var priceLists = new List <DTO.PricingEverydayPriceList>();

            foreach (var priceList in displayEntity.PriceLists)
            {
                priceLists.Add(priceList.ToDto());
            }

            var dto = new DTO.PricingEverydayPriceListGroup(
                displayEntity.Key,
                displayEntity.Name,
                displayEntity.Title,
                displayEntity.Sort,
                priceLists);

            return(dto);
        }