Пример #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(IWahlToken source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.NameId = source.NameId;
			this.Token = source.Token;
			this.WahlId = source.WahlId;
			this.CreationDateTime = source.CreationDateTime;
			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(IWahlToken source, params string[] includedColumns)
		{
			if (includedColumns.Contains(WahlTokenAllTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(WahlTokenAllTable.NameIdCol)) this.NameId = source.NameId;
			if (includedColumns.Contains(WahlTokenAllTable.TokenCol)) this.Token = source.Token;
			if (includedColumns.Contains(WahlTokenAllTable.WahlIdCol)) this.WahlId = source.WahlId;
			if (includedColumns.Contains(WahlTokenAllTable.CreationDateTimeCol)) this.CreationDateTime = source.CreationDateTime;
			if (includedColumns.Contains(WahlTokenAllTable.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(IWahlToken target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.NameId = this.NameId;
			target.Token = this.Token;
			target.WahlId = this.WahlId;
			target.CreationDateTime = this.CreationDateTime;
			target.LastUpdateToken = this.LastUpdateToken;
		}