最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
给你个例子[.NET中三层构架开发实例 - 用户注册系统]
时间:2022-07-02 18:08:22 编辑:袖梨 来源:一聚教程网
数据库基类
using System;
using System.Data;
using System.Data.SqlClient;
namespace HaiSky.HtJob
{
///
/// DbClass 的摘要说明。
///
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;
using System;
using System.Data;
using System.Data.SqlClient;
namespace HaiSky.HtJob
{
///
/// DbClass 的摘要说明。
///
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;
相关文章
- 火影忍者限免英雄怎么用 05-06
- 无尽的拉格朗日怎么搬家 05-06
- 攻城掠地怎么开启角装 05-06
- 帝国时代2怎么控制兵 05-06
- 原神中绀田村的井怎么解锁 05-06
- 率土之滨怎么才能配三名武将 05-06