Beispiel #1
0
 public void FromDTO(ChartModelDTO dto)
 {
     seriesList = dto.SeriesList;
     AxisX      = dto.AxisX;
     nameX      = dto.NameX;
     nameY      = dto.NameY;
     Text       = dto.ChartName;
     Text       = dto.ChartName;
     foreach (ChartModelDTO child in dto.Children)
     {
         Nodes.Add(new ChartModel(child));
     }
 }
Beispiel #2
0
        public new ChartModelDTO ToDTO()
        {
            var dto = new ChartModelDTO
            {
                SeriesList = seriesList,
                AxisX      = AxisX,
                NameX      = nameX,
                NameY      = nameY,
                ChartName  = Text,
            };
            var children = new List <ChartModelDTO>();

            foreach (ChartModel child in Nodes)
            {
                children.Add(child.ToDTO());
            }
            dto.Children = children;
            return(dto);
        }
Beispiel #3
0
 public ChartModel(ChartModelDTO dto)
 {
     FromDTO(dto);
 }