最新下载
热门教程
- 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;
相关文章
- 游戏象棋免费推荐哪些 2026免费的棋类手游下载大全 03-21
- 头号禁区怎么玩 头号禁区新手入门与核心玩法详解 03-21
- 高人气的耐玩手游有哪几个 受欢迎的手游排行榜2026 03-21
- 有趣的单机建设城市的游戏有哪些 热门的建设城市手游下载大全2026 03-21
- 国内优秀单机游戏有哪几个 流行的单机手游排行榜2026 03-21
- 头号禁区上线时间 头号禁区公测日期及开服时间一览 03-21