servicedcomponent.cs

来自「企业内部沟通系统」· CS 代码 · 共 40 行

CS
40
字号
using System;
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;

namespace infoWeb.WebModules.Data
{	
	public abstract class ServicedDbObject : ServicedComponent
	{
		protected SqlConnection Connection;
		private string connectionString;

		protected string ConnectionString
		{ 
			get 
			{
				return connectionString;
			}
		}

		// place all of the helper methods from DbObject here.
		protected override void Construct( string constructString )
		{
			connectionString = constructString;
		}

		protected override void Activate()
		{
			Connection = new SqlConnection( connectionString );
		}

		protected override void Deactivate()
		{
			Connection = null;
		}


	}
}

⌨️ 快捷键说明

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