当前位置: 首页>>代码示例>>C#>>正文


C# datalayer.DBConnection类代码示例

本文整理汇总了C#中OGen.lib.datalayer.DBConnection的典型用法代码示例。如果您正苦于以下问题:C# DBConnection类的具体用法?C# DBConnection怎么用?C# DBConnection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DBConnection类属于OGen.lib.datalayer命名空间,在下文中一共展示了DBConnection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: updObject

		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
				);
			}
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:33,代码来源:SBO_DIC_Dic.cs

示例2: GetDBServerType

		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()
				)
			);
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:26,代码来源:DBConnectionsupport.cs

示例3: getObject_byUser

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:65,代码来源:DO0_vNET_User.cs

示例4: getObject

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:64,代码来源:DO0_NWS_Author.cs

示例5: DO__base

//		#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
		) {}
开发者ID:katshann,项目名称:ogen,代码行数:11,代码来源:DO__base.cs

示例6: base

			internal DO0_vUserGroup
#endif
		(
			DBConnection connection_in
		) : base(
			connection_in
		) {
			clrObject();
			Fields.haschanges_ = false;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:10,代码来源:DO0_vUserGroup.cs

示例7: base

			internal DO0_Logcode
#endif
		(
			DBConnection connection_in
		) : base(
			connection_in
		) {
			clrObject();
			Fields.haschanges_ = false;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:10,代码来源:DO0_Logcode.cs

示例8: base

			internal DO0_Language
#endif
		(
			DBConnection connection_in
		) : base(
			connection_in
		) {
			clrObject();
			fields_.haschanges_ = false;
		}
开发者ID:katshann,项目名称:ogen,代码行数:10,代码来源:DO0_Language.cs

示例9: base

			internal DO0_GroupPermition
#endif
		(
			DBConnection connection_in
		) : base(
			connection_in
		) {
			clrObject();
			fields_.haschanges_ = false;
		}
开发者ID:katshann,项目名称:ogen,代码行数:10,代码来源:DO0_GroupPermition.cs

示例10: base

			internal DO0_vUserDefaultGroup
#endif
		(
			DBConnection connection_in
		) : base(
			connection_in
		) {
			clrObject();
			fields_.haschanges_ = false;
		}
开发者ID:katshann,项目名称:ogen,代码行数:10,代码来源:DO0_vUserDefaultGroup.cs

示例11: getObject

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:60,代码来源:DO0_DIC_TextLanguage.cs

示例12: insObject_CreateUser

		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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:53,代码来源:SBO_CRD_User.cs

示例13: getObject

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:58,代码来源:DO0_LOG_Errortype.cs

示例14: getObject

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:52,代码来源:DO0_DIC_Text.cs

示例15: getObject

		/// <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;
		}
开发者ID:BackupTheBerlios,项目名称:ogen-svn,代码行数:48,代码来源:DO0_CRD_ProfileProfile.cs


注:本文中的OGen.lib.datalayer.DBConnection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。