Beispiel #1
0
 public AnalyticValueDriverMode this[string index] {
     get {
         AnalyticValueDriverMode mode = new AnalyticValueDriverMode();
         foreach (AnalyticValueDriverMode item in Modes)
         {
             if (item.Name == index)
             {
                 mode = item;
                 break;
             }
         }
         return(mode);
     }
 }
Beispiel #2
0
        public static DTO.AnalyticValueDriverMode ToDto(this Display.AnalyticValueDriverMode displayEntity)
        {
            var groups = new List <DTO.ValueDriverGroup>();

            foreach (Display.ValueDriverGroup group in displayEntity.Groups)
            {
                groups.Add(group.ToDto());
            }

            var dto = new DTO.AnalyticValueDriverMode(
                displayEntity.Key,
                displayEntity.IsSelected,
                displayEntity.Name,
                displayEntity.Title,
                displayEntity.Sort,
                groups);

            return(dto);
        }
Beispiel #3
0
        public static Display.AnalyticValueDriverMode ToDisplayEntity(this DTO.AnalyticValueDriverMode dto)
        {
            var displayEntity = new Display.AnalyticValueDriverMode();

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

            if (dto.Groups != null)
            {
                foreach (DTO.ValueDriverGroup group in dto.Groups)
                {
                    displayEntity.Groups.Add(group.ToDisplayEntity());
                }
            }

            return(displayEntity);
        }