コード例 #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(ISecureableUnit source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.Region = source.Region;
			this.NameId = source.NameId;
			this.Depth = source.Depth;
			this.ParentId = source.ParentId;
			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(ISecureableUnit source, params string[] includedColumns)
		{
			if (includedColumns.Contains(SecureableUnitsTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(SecureableUnitsTable.RegionCol)) this.Region = source.Region;
			if (includedColumns.Contains(SecureableUnitsTable.NameIdCol)) this.NameId = source.NameId;
			if (includedColumns.Contains(SecureableUnitsTable.DepthCol)) this.Depth = source.Depth;
			if (includedColumns.Contains(SecureableUnitsTable.ParentIdCol)) this.ParentId = source.ParentId;
			if (includedColumns.Contains(SecureableUnitsTable.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(ISecureableUnit target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.Region = this.Region;
			target.NameId = this.NameId;
			target.Depth = this.Depth;
			target.ParentId = this.ParentId;
			target.LastUpdateToken = this.LastUpdateToken;
		}