コード例 #1
0
		///	<summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary>
		public void Copy_From(IRootDataTemplate source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.NameId = source.NameId;
			this.Beschreibung = source.Beschreibung;
			this.Bereiche = source.Bereiche;
			this.DefaultAccessRightsId = source.DefaultAccessRightsId;
			this.LastUpdateToken = source.LastUpdateToken;
		}
コード例 #2
0
		///	<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(IRootDataTemplate source, params string[] includedColumns)
		{
			if (includedColumns.Contains(RootDataTemplatesTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(RootDataTemplatesTable.NameIdCol)) this.NameId = source.NameId;
			if (includedColumns.Contains(RootDataTemplatesTable.BeschreibungCol)) this.Beschreibung = source.Beschreibung;
			if (includedColumns.Contains(RootDataTemplatesTable.BereicheCol)) this.Bereiche = source.Bereiche;
			if (includedColumns.Contains(RootDataTemplatesTable.DefaultAccessRightsIdCol)) this.DefaultAccessRightsId = source.DefaultAccessRightsId;
			if (includedColumns.Contains(RootDataTemplatesTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken;
		}
コード例 #3
0
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(IRootDataTemplate target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.NameId = this.NameId;
			target.Beschreibung = this.Beschreibung;
			target.Bereiche = this.Bereiche;
			target.DefaultAccessRightsId = this.DefaultAccessRightsId;
			target.LastUpdateToken = this.LastUpdateToken;
		}