最新下载
热门教程
- 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;
相关文章
- 学科网电脑版登录入口-中小学学科网官网一键登录 12-17
- 百度网盘网页版官方首页-百度网盘网页版快捷登录入口 12-17
- 王者万象棋闹闹怎么样 12-17
- 幻灵召唤师哀嚎尖塔如何通关 12-17
- bilibili官方主页入口-弹幕视频网首页直达链接 12-17
- 空灵诗篇佩特拉觉魂有什么技能 12-17