Exemplo n.º 1
0
        public static Display.AnalyticPriceListGroup ToDisplayEntity(this DTO.AnalyticPriceListGroup dto)
        {
            var displayEntity = new Display.AnalyticPriceListGroup();

            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()));
            }

            displayEntity.IsDirty = false;

            return(displayEntity);
        }
Exemplo n.º 2
0
        public static DTO.AnalyticPriceListGroup ToDto(this Display.AnalyticPriceListGroup displayEntity)
        {
            List <DTO.PriceList> priceLists = new List <DTO.PriceList>();

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

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

            return(dto);
        }
Exemplo n.º 3
0
 private bool SelectAllPriceListsCanExecute(Display.AnalyticPriceListGroup priceListGroup)
 {
     return(priceListGroup != null);
 }