示例#1
0
        public object Clone()
        {
            var copy = new ChartViewModel
            {
                Name            = this.Name,
                FieldName       = this.FieldName,
                ChartSchoolType = this.ChartSchoolType,
                ChartType       = this.ChartType,
                ChartGroup      = this.ChartGroup,
                TabType         = this.TabType,
                ShowValue       = this.ShowValue,
                MoreInfo        = this.MoreInfo,
                LastYear        = this.LastYear,
                Downloadable    = this.Downloadable,
                HelpTooltip     = this.HelpTooltip,
                TableColumns    = new List <DataTableColumnViewModel>(),
            };

            if (TableColumns != null)
            {
                TableColumns.ForEach(tc => copy.TableColumns.Add((DataTableColumnViewModel)tc.Clone()));
            }

            return(copy);
        }