public override Region CloneEntity(ProductRule productRule, BaseEntity container) { BodyRegion newRegion = new BodyRegion(container as RegionTable) { _location = _location != null?_location.Clone() : null, EmptyFill = EmptyFill, Field = Field, //Source = Source.Clone() as Source }; if (Source != null) { newRegion.Source = productRule.GetSource(Source.Name); } return(newRegion); }
/// <summary> /// 建立主体区域与标题区域之间数据引用关系(只在解析时调用) /// </summary> internal void LinkRegionSource() { BodyRegion body = GetRegion(RegionType.Body) as BodyRegion; if (body != null) { HeaderRegion header = GetRegion(RegionType.ColumnHeader) as ColumnHeaderRegion; if (header != null) { header.HeaderBodyRelation.ReferecedSource = body.Source; } header = GetRegion(RegionType.RowHeader) as RowHeaderRegion; if (header != null) { header.HeaderBodyRelation.ReferecedSource = body.Source; } } }