public static void updObject( DBConnection dbConnection_in, long idText_in, params OGen.NTier.Kick.lib.datalayer.shared.structures.SO_DIC__TextLanguage[] textLanguage_in ) { SO_DIC_TextLanguage _textlanguage; foreach (OGen.NTier.Kick.lib.datalayer.shared.structures.SO_DIC__TextLanguage _text in textLanguage_in) { #region _textlanguage = ...; _textlanguage = new SO_DIC_TextLanguage( idText_in, _text.IFLanguage, "", "" ); if (_text.Text.Length > 8000) { _textlanguage.Text = _text.Text; _textlanguage.CharVar8000_isNull = true; } else { _textlanguage.Text_isNull = true; _textlanguage.CharVar8000 = _text.Text; } #endregion DO_DIC_TextLanguage.setObject( _textlanguage, true, dbConnection_in ); } }
public static DBServerTypes GetDBServerType( DBConnection connection_in ) { #if PostgreSQL if (connection_in is DBConnection_PostgreSQL) { return DBServerTypes.PostgreSQL; } else #endif if (connection_in is DBConnection_SQLServer) { return DBServerTypes.SQLServer; } #if MySQL else if (connection_in is DBConnection_MySQL) { return DBServerTypes.MySQL; } #endif throw new Exception( string.Format( "unsuported db type: {0}", connection_in.ToString() ) ); }
/// <summary> /// Selects vNET_User values from Database (based on the search condition) and assigns them to the appropriate DO0_vNET_User property. /// </summary> /// <param name="IDUser_search_in">IDUser search condition</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 vNET_User doesn't exists at Database</returns> public static SO_vNET_User getObject_byUser( long IDUser_search_in, DBConnection dbConnection_in ) { SO_vNET_User _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDUser_search_", DbType.Int64, ParameterDirection.Input, IDUser_search_in, 0), _connection.newDBDataParameter("IDUser", DbType.Int64, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("IFApplication", DbType.Int32, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("Login", DbType.AnsiString, ParameterDirection.Output, null, 255), _connection.newDBDataParameter("Name", DbType.AnsiString, ParameterDirection.Output, null, 255), _connection.newDBDataParameter("EMail", DbType.AnsiString, ParameterDirection.Output, null, 255) }; _connection.Execute_SQLFunction( "sp0_vNET_User_getObject_byUser", _dataparameters ); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[1].Value != DBNull.Value) { _output = new SO_vNET_User(); if (_dataparameters[1].Value == System.DBNull.Value) { _output.IDUser = 0L; } else { _output.IDUser = (long)_dataparameters[1].Value; } if (_dataparameters[2].Value == System.DBNull.Value) { _output.IFApplication_isNull = true; } else { _output.IFApplication = (int)_dataparameters[2].Value; } if (_dataparameters[3].Value == System.DBNull.Value) { _output.Login_isNull = true; } else { _output.Login = (string)_dataparameters[3].Value; } if (_dataparameters[4].Value == System.DBNull.Value) { _output.Name_isNull = true; } else { _output.Name = (string)_dataparameters[4].Value; } if (_dataparameters[5].Value == System.DBNull.Value) { _output.EMail_isNull = true; } else { _output.EMail = (string)_dataparameters[5].Value; } return _output; } return null; }
/// <summary> /// Selects NWS_Author values from Database and assigns them to the appropriate DO_NWS_Author property. /// </summary> /// <param name="IDAuthor_in">IDAuthor</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 NWS_Author doesn't exists at Database</returns> public static SO_NWS_Author getObject( long IDAuthor_in, DBConnection dbConnection_in ) { SO_NWS_Author _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDAuthor_", DbType.Int64, ParameterDirection.InputOutput, IDAuthor_in, 0), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("Name_", DbType.AnsiString, ParameterDirection.Output, null, 255), _connection.newDBDataParameter("IFUser__Approved_", DbType.Int64, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("Approved_date_", DbType.DateTime, ParameterDirection.Output, null, 0) }; _connection.Execute_SQLFunction("sp0_NWS_Author_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_NWS_Author(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IDAuthor = 0L; } else { _output.IDAuthor = (long)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.IFApplication_isNull = true; } else { _output.IFApplication = (int)_dataparameters[1].Value; } if (_dataparameters[2].Value == System.DBNull.Value) { _output.Name = string.Empty; } else { _output.Name = (string)_dataparameters[2].Value; } if (_dataparameters[3].Value == System.DBNull.Value) { _output.IFUser__Approved_isNull = true; } else { _output.IFUser__Approved = (long)_dataparameters[3].Value; } if (_dataparameters[4].Value == System.DBNull.Value) { _output.Approved_date_isNull = true; } else { _output.Approved_date = (DateTime)_dataparameters[4].Value; } _output.haschanges_ = false; return _output; } return null; }
// #region public DO__base(...); /// <param name="connection_in">DB Connection</param> public DO__base( DBConnection connection_in ) : this ( connection_in, connection_in.DBServerType, connection_in.Connectionstring, false, // connection_insideInstance_in null ) {}
internal DO0_vUserGroup #endif ( DBConnection connection_in ) : base( connection_in ) { clrObject(); Fields.haschanges_ = false; }
internal DO0_Logcode #endif ( DBConnection connection_in ) : base( connection_in ) { clrObject(); Fields.haschanges_ = false; }
internal DO0_Language #endif ( DBConnection connection_in ) : base( connection_in ) { clrObject(); fields_.haschanges_ = false; }
internal DO0_GroupPermition #endif ( DBConnection connection_in ) : base( connection_in ) { clrObject(); fields_.haschanges_ = false; }
internal DO0_vUserDefaultGroup #endif ( DBConnection connection_in ) : base( connection_in ) { clrObject(); fields_.haschanges_ = false; }
/// <summary> /// Selects DIC_TextLanguage values from Database and assigns them to the appropriate DO_DIC_TextLanguage property. /// </summary> /// <param name="IFText_in">IFText</param> /// <param name="IFLanguage_in">IFLanguage</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 DIC_TextLanguage doesn't exists at Database</returns> public static SO_DIC_TextLanguage getObject( long IFText_in, int IFLanguage_in, DBConnection dbConnection_in ) { SO_DIC_TextLanguage _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IFText_", DbType.Int64, ParameterDirection.InputOutput, IFText_in, 0), _connection.newDBDataParameter("IFLanguage_", DbType.Int32, ParameterDirection.InputOutput, IFLanguage_in, 0), _connection.newDBDataParameter("CharVar8000_", DbType.AnsiString, ParameterDirection.Output, null, 8000), _connection.newDBDataParameter("Text_", DbType.AnsiString, ParameterDirection.Output, null, 0) }; _connection.Execute_SQLFunction("sp0_DIC_TextLanguage_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_DIC_TextLanguage(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IFText = 0L; } else { _output.IFText = (long)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.IFLanguage = 0; } else { _output.IFLanguage = (int)_dataparameters[1].Value; } if (_dataparameters[2].Value == System.DBNull.Value) { _output.CharVar8000_isNull = true; } else { _output.CharVar8000 = (string)_dataparameters[2].Value; } if (_dataparameters[3].Value == System.DBNull.Value) { _output.Text_isNull = true; } else { _output.Text = (string)_dataparameters[3].Value; } _output.haschanges_ = false; return _output; } return null; }
internal static long insObject_CreateUser( Sessionuser sessionUser_in, string login_in, bool selectIdentity_in, ref List<int> errorlist_in, DBConnection con_in ) { long _output = -1L; // ToDos: here! must have permition to create user if (!sessionUser_in.hasPermition( PermitionType.User__insert )) { errorlist_in.Add(ErrorType.user__lack_of_permitions_to_write); return _output; } if (!Sessionuser.checkLogin(login_in, ref errorlist_in)) { return _output; } bool _constraint; _output = DO_CRD_User.insObject( new SO_CRD_User( -1L, login_in, // ToDos: here! encrypt before sending... login_in, // default: password = login sessionUser_in.IDApplication ), selectIdentity_in, out _constraint, con_in ); if (_constraint) { errorlist_in.Add(ErrorType.data__constraint_violation); } else { if (con_in == null) { // assuming NO other (internal) operations are going on errorlist_in.Add(ErrorType.user__successfully_created__WARNING); } } return _output; }
/// <summary> /// Selects LOG_Errortype values from Database and assigns them to the appropriate DO_LOG_Errortype property. /// </summary> /// <param name="IDErrortype_in">IDErrortype</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 LOG_Errortype doesn't exists at Database</returns> public static SO_LOG_Errortype getObject( int IDErrortype_in, DBConnection dbConnection_in ) { SO_LOG_Errortype _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDErrortype_", DbType.Int32, ParameterDirection.InputOutput, IDErrortype_in, 0), _connection.newDBDataParameter("Name_", DbType.AnsiString, ParameterDirection.Output, null, 255), _connection.newDBDataParameter("Description_", DbType.AnsiString, ParameterDirection.Output, null, 2048), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.Output, null, 0) }; _connection.Execute_SQLFunction("sp0_LOG_Errortype_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_LOG_Errortype(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IDErrortype = 0; } else { _output.IDErrortype = (int)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.Name = string.Empty; } else { _output.Name = (string)_dataparameters[1].Value; } if (_dataparameters[2].Value == System.DBNull.Value) { _output.Description_isNull = true; } else { _output.Description = (string)_dataparameters[2].Value; } if (_dataparameters[3].Value == System.DBNull.Value) { _output.IFApplication_isNull = true; } else { _output.IFApplication = (int)_dataparameters[3].Value; } _output.haschanges_ = false; return _output; } return null; }
/// <summary> /// Selects DIC_Text values from Database and assigns them to the appropriate DO_DIC_Text property. /// </summary> /// <param name="IDText_in">IDText</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 DIC_Text doesn't exists at Database</returns> public static SO_DIC_Text getObject( long IDText_in, DBConnection dbConnection_in ) { SO_DIC_Text _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDText_", DbType.Int64, ParameterDirection.InputOutput, IDText_in, 0), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("SourceTableField_ref_", DbType.Int32, ParameterDirection.Output, null, 0) }; _connection.Execute_SQLFunction("sp0_DIC_Text_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_DIC_Text(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IDText = 0L; } else { _output.IDText = (long)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.IFApplication_isNull = true; } else { _output.IFApplication = (int)_dataparameters[1].Value; } if (_dataparameters[2].Value == System.DBNull.Value) { _output.SourceTableField_ref_isNull = true; } else { _output.SourceTableField_ref = (int)_dataparameters[2].Value; } _output.haschanges_ = false; return _output; } return null; }
private DO__base( DBConnection connection_in, string dbServerType_in, string connectionstring_in, bool connection_insideInstance_in, string logfile_in ) { connection__ = connection_in; connection_dbservertype_ = dbServerType_in; connection_connectionstring_ = connectionstring_in; connection_insideinstance_ = connection_insideInstance_in; if (logfile_in == null) { logenabled_ = false; logfile_ = null; } else { logenabled_ = true; logfile_ = logfile_in; } }
/// <summary> /// Selects CRD_ProfileProfile values from Database and assigns them to the appropriate DO_CRD_ProfileProfile property. /// </summary> /// <param name="IFProfile_in">IFProfile</param> /// <param name="IFProfile_parent_in">IFProfile_parent</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 CRD_ProfileProfile doesn't exists at Database</returns> public static SO_CRD_ProfileProfile getObject( long IFProfile_in, long IFProfile_parent_in, DBConnection dbConnection_in ) { SO_CRD_ProfileProfile _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IFProfile_", DbType.Int64, ParameterDirection.InputOutput, IFProfile_in, 0), _connection.newDBDataParameter("IFProfile_parent_", DbType.Int64, ParameterDirection.InputOutput, IFProfile_parent_in, 0) }; _connection.Execute_SQLFunction("sp0_CRD_ProfileProfile_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_CRD_ProfileProfile(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IFProfile = 0L; } else { _output.IFProfile = (long)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.IFProfile_parent = 0L; } else { _output.IFProfile_parent = (long)_dataparameters[1].Value; } _output.haschanges_ = false; return _output; } return null; }
/// <summary> /// Selects DIC_LanguageApplication values from Database and assigns them to the appropriate DO_DIC_LanguageApplication property. /// </summary> /// <param name="IFLanguage_in">IFLanguage</param> /// <param name="IFApplication_in">IFApplication</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 DIC_LanguageApplication doesn't exists at Database</returns> public static SO_DIC_LanguageApplication getObject( int IFLanguage_in, int IFApplication_in, DBConnection dbConnection_in ) { SO_DIC_LanguageApplication _output = null; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IFLanguage_", DbType.Int32, ParameterDirection.InputOutput, IFLanguage_in, 0), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.InputOutput, IFApplication_in, 0) }; _connection.Execute_SQLFunction("sp0_DIC_LanguageApplication_getObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } if (_dataparameters[0].Value != DBNull.Value) { _output = new SO_DIC_LanguageApplication(); if (_dataparameters[0].Value == System.DBNull.Value) { _output.IFLanguage = 0; } else { _output.IFLanguage = (int)_dataparameters[0].Value; } if (_dataparameters[1].Value == System.DBNull.Value) { _output.IFApplication = 0; } else { _output.IFApplication = (int)_dataparameters[1].Value; } _output.haschanges_ = false; return _output; } return null; }
public static long insObject( DBConnection dbConnection_in, int idApplication_in, int sourceTableField_ref_in, params OGen.NTier.Kick.lib.datalayer.shared.structures.SO_DIC__TextLanguage[] textLanguage_in ) { if (textLanguage_in.Length == 0) return -1L; #region SO_DIC_Text _text = ...; SO_DIC_Text _text = new SO_DIC_Text( -1, idApplication_in, sourceTableField_ref_in ); if (idApplication_in <= 0) { _text.IFApplication_isNull = true; } if (sourceTableField_ref_in <= 0) { _text.SourceTableField_ref_isNull = true; } #endregion long _idtext = DO_DIC_Text.insObject( _text, true, dbConnection_in ); updObject( dbConnection_in, _idtext, textLanguage_in ); return _idtext; }
/// <summary> /// Deletes NWS_Author values from Database based on the 'Approved' search. /// </summary> /// <param name="IDApplication_search_in">IDApplication search condition</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 delRecord_Approved( object IDApplication_search_in, DBConnection dbConnection_in ) { DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDApplication_search_", DbType.Int32, ParameterDirection.Input, IDApplication_search_in, 0) }; _connection.Execute_SQLFunction( "sp0_NWS_Author_Record_delete_Approved", _dataparameters ); if (dbConnection_in == null) { _connection.Dispose(); } }
/// <summary> /// Gets Record, based on 'Approved' search. It selects NWS_Author values from Database based on the 'Approved' search. /// </summary> /// <param name="IDApplication_search_in">IDApplication search condition</param> /// <param name="page_in">page number</param> /// <param name="page_numRecords_in">number of records per page</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 SO_NWS_Author[] getRecord_Approved( object IDApplication_search_in, int page_in, int page_numRecords_in, DBConnection dbConnection_in ) { SO_NWS_Author[] _output; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = ((page_in > 0) && (page_numRecords_in > 0)) ? new IDbDataParameter[] { _connection.newDBDataParameter("IDApplication_search_", DbType.Int32, ParameterDirection.Input, IDApplication_search_in, 0), _connection.newDBDataParameter("page_", DbType.Int32, ParameterDirection.Input, page_in, 0), _connection.newDBDataParameter("page_numRecords_", DbType.Int32, ParameterDirection.Input, page_numRecords_in, 0) } : new IDbDataParameter[] { _connection.newDBDataParameter("IDApplication_search_", DbType.Int32, ParameterDirection.Input, IDApplication_search_in, 0) } ; _output = getRecord( _connection.Execute_SQLFunction_returnDataTable( ((page_in > 0) && (page_numRecords_in > 0)) ? "sp0_NWS_Author_Record_open_Approved_page_fullmode" : "sp0_NWS_Author_Record_open_Approved_fullmode", _dataparameters ) ); if (dbConnection_in == null) { _connection.Dispose(); } return _output; }
/// <summary> /// Count's number of search results from NWS_Author at Database based on the 'Approved' search. /// </summary> /// <param name="IDApplication_search_in">IDApplication search condition</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>number of existing Records for the 'Approved' search</returns> public static long getCount_inRecord_Approved( object IDApplication_search_in, DBConnection dbConnection_in ) { long _output; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDApplication_search_", DbType.Int32, ParameterDirection.Input, IDApplication_search_in, 0) }; _output = (long)_connection.Execute_SQLFunction( "fnc0_NWS_Author_Record_count_Approved", _dataparameters, DbType.Int64, 0 ); if (dbConnection_in == null) { _connection.Dispose(); } return _output; }
/// <summary> /// It selects NWS_Author values from Database based on the 'all' search and checks to see if NWS_Author Keys(passed as parameters) are met. /// </summary> /// <param name="IDAuthor_in">NWS_Author's IDAuthor Key used for checking</param> /// <param name="IDApplication_search_in">IDApplication search condition</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>True if NWS_Author Keys are met in the 'all' search, False if not</returns> public static bool isObject_inRecord_all( long IDAuthor_in, object IDApplication_search_in, DBConnection dbConnection_in ) { bool _output; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDAuthor_", DbType.Int64, ParameterDirection.Input, IDAuthor_in, 0), _connection.newDBDataParameter("IDApplication_search_", DbType.Int32, ParameterDirection.Input, IDApplication_search_in, 0) }; _output = (bool)_connection.Execute_SQLFunction( "fnc0_NWS_Author_Record_hasObject_all", _dataparameters, DbType.Boolean, 0 ); if (dbConnection_in == null) { _connection.Dispose(); } return _output; }
/// <summary> /// Deletes CRD_ProfileProfile values from Database based on the 'byProfile' search. /// </summary> /// <param name="IFProfile_search_in">IFProfile search condition</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 delRecord_byProfile( long IFProfile_search_in, DBConnection dbConnection_in ) { DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IFProfile_search_", DbType.Int64, ParameterDirection.Input, IFProfile_search_in, 0) }; _connection.Execute_SQLFunction( "sp0_CRD_ProfileProfile_Record_delete_byProfile", _dataparameters ); if (dbConnection_in == null) { _connection.Dispose(); } }
/// <summary> /// Inserts NWS_Author 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_NWS_Author NWS_Author_in, bool selectIdentity_in, DBConnection dbConnection_in ) { DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDAuthor_", DbType.Int64, ParameterDirection.Output, null, 0), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.Input, NWS_Author_in.IFApplication_isNull ? null : (object)NWS_Author_in.IFApplication, 0), _connection.newDBDataParameter("Name_", DbType.AnsiString, ParameterDirection.Input, NWS_Author_in.Name, 255), _connection.newDBDataParameter("IFUser__Approved_", DbType.Int64, ParameterDirection.Input, NWS_Author_in.IFUser__Approved_isNull ? null : (object)NWS_Author_in.IFUser__Approved, 0), _connection.newDBDataParameter("Approved_date_", DbType.DateTime, ParameterDirection.Input, NWS_Author_in.Approved_date_isNull ? null : (object)NWS_Author_in.Approved_date, 0), _connection.newDBDataParameter("SelectIdentity_", DbType.Boolean, ParameterDirection.Input, selectIdentity_in, 1) }; _connection.Execute_SQLFunction( "sp0_NWS_Author_insObject", _dataparameters ); if (dbConnection_in == null) { _connection.Dispose(); } NWS_Author_in.IDAuthor = (long)_dataparameters[0].Value;NWS_Author_in.haschanges_ = false; return NWS_Author_in.IDAuthor; }
/// <summary> /// Updates NWS_Author 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_NWS_Author NWS_Author_in, bool forceUpdate_in, DBConnection dbConnection_in ) { if (forceUpdate_in || NWS_Author_in.haschanges_) { DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDAuthor_", DbType.Int64, ParameterDirection.Input, NWS_Author_in.IDAuthor, 0), _connection.newDBDataParameter("IFApplication_", DbType.Int32, ParameterDirection.Input, NWS_Author_in.IFApplication_isNull ? null : (object)NWS_Author_in.IFApplication, 0), _connection.newDBDataParameter("Name_", DbType.AnsiString, ParameterDirection.Input, NWS_Author_in.Name, 255), _connection.newDBDataParameter("IFUser__Approved_", DbType.Int64, ParameterDirection.Input, NWS_Author_in.IFUser__Approved_isNull ? null : (object)NWS_Author_in.IFUser__Approved, 0), _connection.newDBDataParameter("Approved_date_", DbType.DateTime, ParameterDirection.Input, NWS_Author_in.Approved_date_isNull ? null : (object)NWS_Author_in.Approved_date, 0) }; _connection.Execute_SQLFunction( "sp0_NWS_Author_updObject", _dataparameters ); if (dbConnection_in == null) { _connection.Dispose(); } NWS_Author_in.haschanges_ = false; } }
/// <summary> /// Deletes NWS_Author from Database. /// </summary> /// <param name="IDAuthor_in">IDAuthor</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 delObject( long IDAuthor_in, DBConnection dbConnection_in ) { DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDAuthor_", DbType.Int64, ParameterDirection.Input, IDAuthor_in, 0) }; _connection.Execute_SQLFunction("sp0_NWS_Author_delObject", _dataparameters); if (dbConnection_in == null) { _connection.Dispose(); } }
/// <summary> /// Count's number of search results from vNWS_Attachment at Database based on the 'byContent_andL' search. /// </summary> /// <param name="IDContent_search_in">IDContent search condition</param> /// <param name="IDLanguage_search_in">IDLanguage search condition</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>number of existing Records for the 'byContent_andL' search</returns> public static long getCount_inRecord_byContent_andL( object IDContent_search_in, int IDLanguage_search_in, DBConnection dbConnection_in ) { long _output; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDContent_search_", DbType.Int64, ParameterDirection.Input, IDContent_search_in, 0), _connection.newDBDataParameter("IDLanguage_search_", DbType.Int32, ParameterDirection.Input, IDLanguage_search_in, 0) }; _output = (long)_connection.Execute_SQLFunction( "fnc0_vNWS_Attachment_Record_count_byContent_andL", _dataparameters, DbType.Int64, 0 ); if (dbConnection_in == null) { _connection.Dispose(); } return _output; }
/// <summary> /// Making the use of Database Transactions possible on a sequence of operations across multiple DataObjects. /// </summary> /// <param name="connection_in">opened Database connection with an initiated Transaction</param> public DO_Permition(DBConnection connection_in) : base(connection_in) { }
/// <summary> /// Making the use of Database Transactions possible on a sequence of operations across multiple DataObjects. /// </summary> /// <param name="connection_in">opened Database connection with an initiated Transaction</param> public DO_Config(DBConnection connection_in) : base(connection_in) { }
/// <summary> /// Count's number of search results from vCRD_ProfilePermition at Database based on the 'byProfile' search. /// </summary> /// <param name="IDProfile_search_in">IDProfile search condition</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>number of existing Records for the 'byProfile' search</returns> public static long getCount_inRecord_byProfile( long IDProfile_search_in, DBConnection dbConnection_in ) { long _output; DBConnection _connection = (dbConnection_in == null) ? DO__utils.DBConnection_createInstance( DO__utils.DBServerType, DO__utils.DBConnectionstring, DO__utils.DBLogfile ) : dbConnection_in; IDbDataParameter[] _dataparameters = new IDbDataParameter[] { _connection.newDBDataParameter("IDProfile_search_", DbType.Int64, ParameterDirection.Input, IDProfile_search_in, 0) }; _output = (long)_connection.Execute_SQLFunction( "fnc0_vCRD_ProfilePermition_Record_count_byProfile", _dataparameters, DbType.Int64, 0 ); if (dbConnection_in == null) { _connection.Dispose(); } return _output; }