⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectionobject.cs

📁 c#源代码
💻 CS
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.2032
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
using System;
using System.Data;	
using System.Data.OleDb;

/// <summary>
/// This class handles the connection to a DataBase 
/// </summary>
/// <remarks>
/// 	created by - Forstmeier Peter
/// 	created on - 17.10.2005 22:59:39
/// </remarks>

namespace SharpReportCore {
	public class ConnectionObject : object {
		IDbConnection connection;
		string password;
		string username;
		string connectionString;
		
		
		public ConnectionObject(string connectionString):this(connectionString,"","") {
		}
		
		public ConnectionObject(string connectionString, string password, string username)
		{
			if (connectionString == "") {
				throw new ArgumentNullException("ConnectionObject:ConnectionString");
			}
			this.connectionString = connectionString;
			this.password = password;
			this.username = username;
			this.connection = new OleDbConnection (this.connectionString);
		}
		
		public ConnectionObject(IDbConnection connection, string password, string username)
		{
			this.connection = connection;
			this.password = password;
			this.username = username;
			this.connectionString = this.connection.ConnectionString;
		}
		
		
		public IDbConnection Connection {
			get {
				return connection;
			}
			set {
				connection = value;
			}
		}
		public string Password {
			get {
				return password;
			}
			set {
				password = value;
			}
		}
		public string Username {
			get {
				return username;
			}
			set {
				username = value;
			}
		}
		
//		public string ConnectionString {
//			get {
//				return connectionString;
//			}
//		}
		
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -