Пример #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(IBookableUnit source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.NameId = source.NameId;
			this.RessourceId = source.RessourceId;
			this.ActiveFrom = source.ActiveFrom;
			this.ActiveTo = source.ActiveTo;
			this.TimeTableId = source.TimeTableId;
		}
Пример #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(IBookableUnit source, params string[] includedColumns)
		{
			if (includedColumns.Contains(BookableUnitsTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(BookableUnitsTable.NameIdCol)) this.NameId = source.NameId;
			if (includedColumns.Contains(BookableUnitsTable.RessourceIdCol)) this.RessourceId = source.RessourceId;
			if (includedColumns.Contains(BookableUnitsTable.ActiveFromCol)) this.ActiveFrom = source.ActiveFrom;
			if (includedColumns.Contains(BookableUnitsTable.ActiveToCol)) this.ActiveTo = source.ActiveTo;
			if (includedColumns.Contains(BookableUnitsTable.TimeTableIdCol)) this.TimeTableId = source.TimeTableId;
		}
Пример #3
0
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(IBookableUnit target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.NameId = this.NameId;
			target.RessourceId = this.RessourceId;
			target.ActiveFrom = this.ActiveFrom;
			target.ActiveTo = this.ActiveTo;
			target.TimeTableId = this.TimeTableId;
		}