/// <summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary> public void Copy_From(IMapKachel source, bool includePrimaryKey = false) { if (includePrimaryKey) this.Id = source.Id; this.NameId = source.NameId; this.Description = source.Description; this.Type = source.Type; this.TopY = source.TopY; this.LeftX = source.LeftX; this.BottomY = source.BottomY; this.RightX = source.RightX; this.TextPositionLeftX = source.TextPositionLeftX; this.TextPositionTopY = source.TextPositionTopY; this.TextSizingFactor = source.TextSizingFactor; this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> /// This method copy's each database field which is in the <paramref name="includedColumns"/> /// from the <paramref name="source"/> interface to this data row. /// </summary> public void Copy_From_But_TakeOnly(IMapKachel source, params string[] includedColumns) { if (includedColumns.Contains(MapKachelnTable.IdCol)) this.Id = source.Id; if (includedColumns.Contains(MapKachelnTable.NameIdCol)) this.NameId = source.NameId; if (includedColumns.Contains(MapKachelnTable.DescriptionCol)) this.Description = source.Description; if (includedColumns.Contains(MapKachelnTable.TypeCol)) this.Type = source.Type; if (includedColumns.Contains(MapKachelnTable.TopYCol)) this.TopY = source.TopY; if (includedColumns.Contains(MapKachelnTable.LeftXCol)) this.LeftX = source.LeftX; if (includedColumns.Contains(MapKachelnTable.BottomYCol)) this.BottomY = source.BottomY; if (includedColumns.Contains(MapKachelnTable.RightXCol)) this.RightX = source.RightX; if (includedColumns.Contains(MapKachelnTable.TextPositionLeftXCol)) this.TextPositionLeftX = source.TextPositionLeftX; if (includedColumns.Contains(MapKachelnTable.TextPositionTopYCol)) this.TextPositionTopY = source.TextPositionTopY; if (includedColumns.Contains(MapKachelnTable.TextSizingFactorCol)) this.TextSizingFactor = source.TextSizingFactor; if (includedColumns.Contains(MapKachelnTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> This method copy's each database field into the <paramref name="target"/> interface. </summary> public void Copy_To(IMapKachel target, bool includePrimaryKey = false) { if (includePrimaryKey) target.Id = this.Id; target.NameId = this.NameId; target.Description = this.Description; target.Type = this.Type; target.TopY = this.TopY; target.LeftX = this.LeftX; target.BottomY = this.BottomY; target.RightX = this.RightX; target.TextPositionLeftX = this.TextPositionLeftX; target.TextPositionTopY = this.TextPositionTopY; target.TextSizingFactor = this.TextSizingFactor; target.LastUpdateToken = this.LastUpdateToken; }