public static DataTable getDataTable(
			SO_NWS_ContentHighlight[] serializableobjects_in
		) {
			DataTable _output = new DataTable();
			DataRow _dr;

			DataColumn _dc_ifcontent = new DataColumn("IFContent", typeof(long));
			_output.Columns.Add(_dc_ifcontent);
			DataColumn _dc_ifhighlight = new DataColumn("IFHighlight", typeof(long));
			_output.Columns.Add(_dc_ifhighlight);
			DataColumn _dc_begin_date = new DataColumn("Begin_date", typeof(DateTime));
			_output.Columns.Add(_dc_begin_date);
			DataColumn _dc_end_date = new DataColumn("End_date", typeof(DateTime));
			_output.Columns.Add(_dc_end_date);

			foreach (SO_NWS_ContentHighlight _serializableobject in serializableobjects_in) {
				_dr = _output.NewRow();

				_dr[_dc_ifcontent] = _serializableobject.IFContent;
				_dr[_dc_ifhighlight] = _serializableobject.IFHighlight;
				_dr[_dc_begin_date] = _serializableobject.Begin_date;
				_dr[_dc_end_date] = _serializableobject.End_date;

				_output.Rows.Add(_dr);
			}

			return _output;
		}
예제 #2
0
//		#endregion
		#region private static void relate(...);
		private static void relate(
			long[] idTags_in,
			long[] idAuthors_in,
			long[] idSources_in,
			long[] idHighlights_in, 
			long[] idProfiles_in, 

			long idContent_in,

			DBConnection con_in
		) {
			#region Tags . . .
			foreach (int _idtag in idTags_in) {
				DO_NWS_ContentTag.setObject(
					new SO_NWS_ContentTag(
						idContent_in,
						_idtag
					),
					true,

					con_in
				);
			}
			#endregion
			#region Authors . . .
			foreach (int _idauthor in idAuthors_in) {
				DO_NWS_ContentAuthor.setObject(
					new SO_NWS_ContentAuthor(
						idContent_in,
						_idauthor
					),
					true,

					con_in
				);
			}
			#endregion
			#region Sources . . .
			foreach (int _idsource in idSources_in) {
				DO_NWS_ContentSource.setObject(
					new SO_NWS_ContentSource(
						idContent_in,
						_idsource
					),
					true,

					con_in
				);
			}
			#endregion
			#region Highlights . . .
			foreach (int _idhighlight in idHighlights_in) {
				SO_NWS_ContentHighlight _highlight 
					= new SO_NWS_ContentHighlight(
						idContent_in,
						_idhighlight, 
						datetime_minvalue_, 
						datetime_minvalue_
					);
				_highlight.Begin_date_isNull = true;
				_highlight.End_date_isNull = true;

				DO_NWS_ContentHighlight.setObject(
					_highlight,
					true,

					con_in
				);
			}
			#endregion
			#region Profiles . . .
			foreach (int _idprofile in idProfiles_in) {
				DO_NWS_ContentProfile.setObject(
					new SO_NWS_ContentProfile(
						idContent_in,
						_idprofile
					),
					true,

					con_in
				);
			}
			#endregion
		}