Esempio n. 1
0
		public static DataTable getDataTable(
			SO_NET_Browser[] serializableObjects_in
		) {
			DataTable _output = new DataTable();
			_output.Locale = System.Globalization.CultureInfo.CurrentCulture;
			DataRow _dr;

			DataColumn _dc_idbrowser = new DataColumn("IDBrowser", typeof(long));
			_output.Columns.Add(_dc_idbrowser);
			DataColumn _dc_http_full_signature = new DataColumn("HTTP_FULL_SIGNATURE", typeof(string));
			_output.Columns.Add(_dc_http_full_signature);
			DataColumn _dc_http_full_signature__crc = new DataColumn("HTTP_FULL_SIGNATURE__CRC", typeof(long));
			_output.Columns.Add(_dc_http_full_signature__crc);
			DataColumn _dc_http_accept = new DataColumn("HTTP_ACCEPT", typeof(string));
			_output.Columns.Add(_dc_http_accept);
			DataColumn _dc_http_accept__crc = new DataColumn("HTTP_ACCEPT__CRC", typeof(long));
			_output.Columns.Add(_dc_http_accept__crc);
			DataColumn _dc_http_accept_charset = new DataColumn("HTTP_ACCEPT_CHARSET", typeof(string));
			_output.Columns.Add(_dc_http_accept_charset);
			DataColumn _dc_http_accept_charset__crc = new DataColumn("HTTP_ACCEPT_CHARSET__CRC", typeof(long));
			_output.Columns.Add(_dc_http_accept_charset__crc);
			DataColumn _dc_http_accept_encoding = new DataColumn("HTTP_ACCEPT_ENCODING", typeof(string));
			_output.Columns.Add(_dc_http_accept_encoding);
			DataColumn _dc_http_accept_encoding__crc = new DataColumn("HTTP_ACCEPT_ENCODING__CRC", typeof(long));
			_output.Columns.Add(_dc_http_accept_encoding__crc);
			DataColumn _dc_http_accept_language = new DataColumn("HTTP_ACCEPT_LANGUAGE", typeof(string));
			_output.Columns.Add(_dc_http_accept_language);
			DataColumn _dc_http_accept_language__crc = new DataColumn("HTTP_ACCEPT_LANGUAGE__CRC", typeof(long));
			_output.Columns.Add(_dc_http_accept_language__crc);
			DataColumn _dc_http_user_agent = new DataColumn("HTTP_USER_AGENT", typeof(string));
			_output.Columns.Add(_dc_http_user_agent);
			DataColumn _dc_http_user_agent__crc = new DataColumn("HTTP_USER_AGENT__CRC", typeof(long));
			_output.Columns.Add(_dc_http_user_agent__crc);

			foreach (SO_NET_Browser _serializableObject in serializableObjects_in) {
				_dr = _output.NewRow();

				_dr[_dc_idbrowser] = _serializableObject.IDBrowser;
				_dr[_dc_http_full_signature] = _serializableObject.HTTP_FULL_SIGNATURE;
				_dr[_dc_http_full_signature__crc] = _serializableObject.HTTP_FULL_SIGNATURE__CRC;
				_dr[_dc_http_accept] = _serializableObject.HTTP_ACCEPT;
				_dr[_dc_http_accept__crc] = _serializableObject.HTTP_ACCEPT__CRC;
				_dr[_dc_http_accept_charset] = _serializableObject.HTTP_ACCEPT_CHARSET;
				_dr[_dc_http_accept_charset__crc] = _serializableObject.HTTP_ACCEPT_CHARSET__CRC;
				_dr[_dc_http_accept_encoding] = _serializableObject.HTTP_ACCEPT_ENCODING;
				_dr[_dc_http_accept_encoding__crc] = _serializableObject.HTTP_ACCEPT_ENCODING__CRC;
				_dr[_dc_http_accept_language] = _serializableObject.HTTP_ACCEPT_LANGUAGE;
				_dr[_dc_http_accept_language__crc] = _serializableObject.HTTP_ACCEPT_LANGUAGE__CRC;
				_dr[_dc_http_user_agent] = _serializableObject.HTTP_USER_AGENT;
				_dr[_dc_http_user_agent__crc] = _serializableObject.HTTP_USER_AGENT__CRC;

				_output.Rows.Add(_dr);
			}

			return _output;
		}
Esempio n. 2
0
		/// <summary>
		/// Selects NET_Browser values from Database and assigns them to the appropriate DO_NET_Browser property.
		/// </summary>
		/// <param name="IDBrowser_in">IDBrowser</param>
		/// <param name="dbConnection_in">Database connection, making the use of Database Transactions possible on a sequence of operations across the same or multiple DataObjects</param>
		/// <returns>null if NET_Browser doesn't exists at Database</returns>
		public static SO_NET_Browser getObject(
			long IDBrowser_in, 
			DBConnection dbConnection_in
		) {
			SO_NET_Browser _output = null;

			DBConnection _connection = (dbConnection_in == null)
				? DO__Utilities.DBConnection_createInstance(
					DO__Utilities.DBServerType,
					DO__Utilities.DBConnectionstring,
					DO__Utilities.DBLogfile
				) 
				: dbConnection_in;
			IDbDataParameter[] _dataparameters = new IDbDataParameter[] {
				_connection.newDBDataParameter("IDBrowser_", DbType.Int64, ParameterDirection.InputOutput, IDBrowser_in, 0), 
				_connection.newDBDataParameter("HTTP_FULL_SIGNATURE_", DbType.AnsiString, ParameterDirection.Output, null, 1024), 
				_connection.newDBDataParameter("HTTP_FULL_SIGNATURE__CRC_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_", DbType.AnsiString, ParameterDirection.Output, null, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT__CRC_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET_", DbType.AnsiString, ParameterDirection.Output, null, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET__CRC_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING_", DbType.AnsiString, ParameterDirection.Output, null, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING__CRC_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE_", DbType.AnsiString, ParameterDirection.Output, null, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE__CRC_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_USER_AGENT_", DbType.AnsiString, ParameterDirection.Output, null, 255), 
				_connection.newDBDataParameter("HTTP_USER_AGENT__CRC_", DbType.Int64, ParameterDirection.Output, null, 0)
			};
			_connection.Execute_SQLFunction("sp0_NET_Browser_getObject", _dataparameters);
			if (dbConnection_in == null) { _connection.Dispose(); }

			if (_dataparameters[0].Value != DBNull.Value) {
				_output = new SO_NET_Browser();

				if (_dataparameters[0].Value == System.DBNull.Value) {
					_output.IDBrowser = 0L;
				} else {
					_output.IDBrowser = (long)_dataparameters[0].Value;
				}
				if (_dataparameters[1].Value == System.DBNull.Value) {
					_output.HTTP_FULL_SIGNATURE = string.Empty;
				} else {
					_output.HTTP_FULL_SIGNATURE = (string)_dataparameters[1].Value;
				}
				if (_dataparameters[2].Value == System.DBNull.Value) {
					_output.HTTP_FULL_SIGNATURE__CRC = 0L;
				} else {
					_output.HTTP_FULL_SIGNATURE__CRC = (long)_dataparameters[2].Value;
				}
				if (_dataparameters[3].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT = string.Empty;
				} else {
					_output.HTTP_ACCEPT = (string)_dataparameters[3].Value;
				}
				if (_dataparameters[4].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT__CRC = 0L;
				} else {
					_output.HTTP_ACCEPT__CRC = (long)_dataparameters[4].Value;
				}
				if (_dataparameters[5].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_CHARSET = string.Empty;
				} else {
					_output.HTTP_ACCEPT_CHARSET = (string)_dataparameters[5].Value;
				}
				if (_dataparameters[6].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_CHARSET__CRC = 0L;
				} else {
					_output.HTTP_ACCEPT_CHARSET__CRC = (long)_dataparameters[6].Value;
				}
				if (_dataparameters[7].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_ENCODING = string.Empty;
				} else {
					_output.HTTP_ACCEPT_ENCODING = (string)_dataparameters[7].Value;
				}
				if (_dataparameters[8].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_ENCODING__CRC = 0L;
				} else {
					_output.HTTP_ACCEPT_ENCODING__CRC = (long)_dataparameters[8].Value;
				}
				if (_dataparameters[9].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_LANGUAGE = string.Empty;
				} else {
					_output.HTTP_ACCEPT_LANGUAGE = (string)_dataparameters[9].Value;
				}
				if (_dataparameters[10].Value == System.DBNull.Value) {
					_output.HTTP_ACCEPT_LANGUAGE__CRC = 0L;
				} else {
					_output.HTTP_ACCEPT_LANGUAGE__CRC = (long)_dataparameters[10].Value;
				}
				if (_dataparameters[11].Value == System.DBNull.Value) {
					_output.HTTP_USER_AGENT = string.Empty;
				} else {
					_output.HTTP_USER_AGENT = (string)_dataparameters[11].Value;
				}
				if (_dataparameters[12].Value == System.DBNull.Value) {
					_output.HTTP_USER_AGENT__CRC = 0L;
				} else {
					_output.HTTP_USER_AGENT__CRC = (long)_dataparameters[12].Value;
				}

				_output.HasChanges = false;
				return _output;
			}

			return null;
		}
Esempio n. 3
0
		/// <summary>
		/// Updates NET_Browser values on Database.
		/// </summary>
		/// <param name="forceUpdate_in">assign with True if you wish to force an Update (even if no changes have been made since last time getObject method was run) and False if not</param>
		/// <param name="dbConnection_in">Database connection, making the use of Database Transactions possible on a sequence of operations across the same or multiple DataObjects</param>
		public static void updObject(
			SO_NET_Browser NET_Browser_in, 
			bool forceUpdate_in, 
			DBConnection dbConnection_in
		) {
			if (forceUpdate_in || NET_Browser_in.HasChanges) {
				DBConnection _connection = (dbConnection_in == null)
					? DO__Utilities.DBConnection_createInstance(
						DO__Utilities.DBServerType,
						DO__Utilities.DBConnectionstring,
						DO__Utilities.DBLogfile
					) 
					: dbConnection_in;

				IDbDataParameter[] _dataparameters = new IDbDataParameter[] {
					_connection.newDBDataParameter("IDBrowser_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.IDBrowser, 0), 
					_connection.newDBDataParameter("HTTP_FULL_SIGNATURE_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_FULL_SIGNATURE, 1024), 
					_connection.newDBDataParameter("HTTP_FULL_SIGNATURE__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_FULL_SIGNATURE__CRC, 0), 
					_connection.newDBDataParameter("HTTP_ACCEPT_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT, 255), 
					_connection.newDBDataParameter("HTTP_ACCEPT__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT__CRC, 0), 
					_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_CHARSET, 255), 
					_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_CHARSET__CRC, 0), 
					_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_ENCODING, 255), 
					_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_ENCODING__CRC, 0), 
					_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_LANGUAGE, 255), 
					_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_LANGUAGE__CRC, 0), 
					_connection.newDBDataParameter("HTTP_USER_AGENT_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_USER_AGENT, 255), 
					_connection.newDBDataParameter("HTTP_USER_AGENT__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_USER_AGENT__CRC, 0)
				};
				_connection.Execute_SQLFunction(
					"sp0_NET_Browser_updObject", 
					_dataparameters
				);
				if (dbConnection_in == null) { _connection.Dispose(); }
				NET_Browser_in.HasChanges = false;
			}
		}
Esempio n. 4
0
		/// <summary>
		/// Updates NET_Browser values on Database.
		/// </summary>
		/// <param name="forceUpdate_in">assign with True if you wish to force an Update (even if no changes have been made since last time getObject method was run) and False if not</param>
		public static void updObject(
			SO_NET_Browser NET_Browser_in, 
			bool forceUpdate_in
		) {
			updObject(
				NET_Browser_in, 
				forceUpdate_in, 
				null
			);
		}
Esempio n. 5
0
		/// <summary>
		/// Inserts NET_Browser values into Database.
		/// </summary>
		/// <param name="selectIdentity_in">assign with True if you wish to retrieve insertion sequence/identity seed and with False if not</param>
		/// <param name="dbConnection_in">Database connection, making the use of Database Transactions possible on a sequence of operations across the same or multiple DataObjects</param>
		/// <returns>insertion sequence/identity seed</returns>
		public static long insObject(
			SO_NET_Browser NET_Browser_in, 
			bool selectIdentity_in, 
			DBConnection dbConnection_in
		) {
			DBConnection _connection = (dbConnection_in == null)
				? DO__Utilities.DBConnection_createInstance(
					DO__Utilities.DBServerType,
					DO__Utilities.DBConnectionstring,
					DO__Utilities.DBLogfile
				) 
				: dbConnection_in;
			IDbDataParameter[] _dataparameters = new IDbDataParameter[] {
				_connection.newDBDataParameter("IDBrowser_", DbType.Int64, ParameterDirection.Output, null, 0), 
				_connection.newDBDataParameter("HTTP_FULL_SIGNATURE_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_FULL_SIGNATURE, 1024), 
				_connection.newDBDataParameter("HTTP_FULL_SIGNATURE__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_FULL_SIGNATURE__CRC, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT__CRC, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_CHARSET, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_CHARSET__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_CHARSET__CRC, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_ENCODING, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_ENCODING__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_ENCODING__CRC, 0), 
				_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_LANGUAGE, 255), 
				_connection.newDBDataParameter("HTTP_ACCEPT_LANGUAGE__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_ACCEPT_LANGUAGE__CRC, 0), 
				_connection.newDBDataParameter("HTTP_USER_AGENT_", DbType.AnsiString, ParameterDirection.Input, NET_Browser_in.HTTP_USER_AGENT, 255), 
				_connection.newDBDataParameter("HTTP_USER_AGENT__CRC_", DbType.Int64, ParameterDirection.Input, NET_Browser_in.HTTP_USER_AGENT__CRC, 0), 

				_connection.newDBDataParameter("SelectIdentity_", DbType.Boolean, ParameterDirection.Input, selectIdentity_in, 1)
			};
			_connection.Execute_SQLFunction(
				"sp0_NET_Browser_insObject", 
				_dataparameters
			);
			if (dbConnection_in == null) { _connection.Dispose(); }

			NET_Browser_in.IDBrowser = (long)_dataparameters[0].Value;NET_Browser_in.HasChanges = false;
			

			return NET_Browser_in.IDBrowser;
		}
Esempio n. 6
0
		/// <summary>
		/// Inserts NET_Browser values into Database.
		/// </summary>
		/// <param name="selectIdentity_in">assign with True if you wish to retrieve insertion sequence/identity seed and with False if not</param>
		/// <returns>insertion sequence/identity seed</returns>
		public static long insObject(
			SO_NET_Browser NET_Browser_in, 
			bool selectIdentity_in
		) {
			return insObject(
				NET_Browser_in, 
				selectIdentity_in, 
				null
			);
		}