數據庫基類
using System;
using System.Data;
using System.Data.SqlClient;
namespace HaiSky.HtJob
{
/// <summary>
/// DbClass 的摘要說明。
/// </summary>
public class DbClass
{
private string connectionString;
protected SqlConnection Connection;
public DbClass(string newConnectionString)
{
connectionString = newConnectionString;
Connection = new SqlConnection(connectionString);
}
public string ConnectionString
{
get
{
return connectionString;
}
}
private SqlCommand BuildQueryCommand(string storedProcName,IDataParameter[] parameters)
{
SqlCommand command = new SqlCommand(storedProcName,Connection);
command.CommandType = CommandType.StoredProcedure;