资源简介
某大学网络教学平台全部源码(经典)c#某大学网络教学平台全部源码(经典)c#
代码片段和文件信息
using System;
namespace Teaching.DAC
{
///
/// 对数据源连接字符串构成的封装,可以生成不同数据源的连接字符串。
///
public class ConnectionStringHelper
{
public ConnectionStringHelper()
{
//
// TODO: Add constructor logic here
//
}
// 创建Sql Server以用户授权方式访问的数据库连接字符串
// “Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;“
static public string CreateSqlConnectionString(string server string database string userId string password)
{
string connectionString = ““;
if(server == null || server == ““ || database == null || database == ““ || userId == null || userId == ““)
{
return connectionString;
}
connectionString = “Data Source=“ + server + “;Initial Catalog=“ + database + “;User Id=“ + userId + “;Password=“ + password + “;Connect Timeout=30;“;
return connectionString;
}
// 创建Sql Server以安全模式访问的数据库连接字符串
// “Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;“ - or - “Server=Aron1;Database=pubs;Trusted_Connection=True;“
static public string CreateSqlConnectionString(string server string database)
{
string connectionString = ““;
if(server == null || server == ““ || database == null || database == ““)
{
return connectionString;
}
connectionString = “Data Source=“ + server + “;Initial Catalog=“ + database + “;Integrated Security=SSPI;Connect Timeout=30;“;
return connectionString;
}
// 创建Sql Server的OleDb数据源类型的连接字符串
// “Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;“
static public string CreateSqlOleDbConnectionString(string dataSource string database string userId string password)
{
string connectionString = ““;
if(dataSource == null || dataSource == ““ || database == null || database == ““ || userId == null || userId == ““)
{
return ““;
}
connectionString = “Provider=sqloledb;Data Source=“ + dataSource + “;Initial Catalog=“ + database + “;User Id=“ + userId + “;Password=“ + password + “;Connect Timeout=30;“;
return connectionString;
}
// 创建Sql Server的OleDb的数据源类型的连接字符串
// “Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;“
static public string CreateSqlOleDbConnectionString(string dataSource string database)
{
string connectionString = ““;
if(dataSource == null || dataSource == ““ || database == null || database == ““)
{
return ““;
}
connectionString = “Provider=sqloledb;Data Source=“ + dataSource + “;Initial Catalog=“ + database + “;Integrated Security=SSPI;Connect Timeout=30;“;
return connectionString;
}
// 创建Oracle连接字符串-信任模式 “Data Source=MyOracleDB;Integrated Security=yes;“
static public string CreateOracleConnectionString(string dataSource)
{
string connectionString = ““;
if(dataSource == null || dataSource == ““)
return connectionString;
connectionString =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 28160 2010-02-28 18:44 Teaching.User\bin\Debug\Teaching.DAC.dll
文件 112128 2010-02-28 18:44 Teaching.User\bin\Debug\Teaching.DAC.pdb
文件 67584 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.MOD.dll
文件 386560 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.MOD.pdb
文件 72704 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.User.dll
文件 144896 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.User.pdb
文件 7168 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.Utility.dll
文件 15872 2010-03-09 20:59 Teaching.User\bin\Debug\Teaching.Utility.pdb
文件 6646 2010-03-09 20:59 Teaching.User\obj\Debug\ResolveAssemblyReference.cache
文件 697 2010-03-09 20:59 Teaching.User\obj\Debug\Teaching.User.csproj.FileListAbsolute.txt
文件 72704 2010-03-09 20:59 Teaching.User\obj\Debug\Teaching.User.dll
文件 144896 2010-03-09 20:59 Teaching.User\obj\Debug\Teaching.User.pdb
文件 1452 2008-11-20 11:28 Teaching.User\Properties\AssemblyInfo.cs
文件 41363 2009-09-05 20:57 Teaching.User\SqlStudentDAL.cs
文件 26008 2009-08-20 22:01 Teaching.User\SqlSysUserDAL.cs
文件 41555 2009-10-07 23:05 Teaching.User\SqlTeacherDAL.cs
文件 13703 2009-06-20 23:23 Teaching.User\SqlUserGroupDAL.cs
文件 39237 2010-01-31 18:24 Teaching.User\SqlUserInfoDAL.cs
文件 13292 2010-01-22 23:10 Teaching.User\SqlUserTypeDAL.cs
文件 5538 2009-06-13 08:22 Teaching.User\StudentDAL.cs
文件 640 2008-11-20 11:41 Teaching.User\StudentDALFactory.cs
文件 238 2009-08-14 22:02 Teaching.User\SysUserBLL.cs
文件 4850 2009-08-20 21:46 Teaching.User\SysUserDAL.cs
文件 640 2008-11-20 11:41 Teaching.User\SysUserDALFactory.cs
文件 5609 2009-10-06 15:20 Teaching.User\TeacherDAL.cs
文件 640 2008-11-20 11:41 Teaching.User\TeacherDALFactory.cs
文件 3976 2009-08-14 22:32 Teaching.User\Teaching.User.csproj
文件 13946 2009-09-05 11:16 Teaching.User\UserBLL.cs
文件 4650 2009-06-20 23:22 Teaching.User\UserGroupDAL.cs
文件 646 2008-11-20 11:41 Teaching.User\UserGroupDALFactory.cs
............此处省略2176个文件信息
相关资源
- C# in Depth 第四版
- C#编写上位机软件串口助手,无需修改
- C#项目之视频监控系统含源码
- C#项目之企业人事管理系统含源码
- C#进销存管理系统完整版,附数据库文
- C#网上购物系统源码
- C#学生选课系统
- 使用C#写的抽奖机(能够随机抽取一二
- 学生管理系统 c#开发 详解
- PLC通讯实现-C#访问三菱PLCCPU-R04-MxCom
- C# 基于UDP即时聊天程序源代码
- 基于VS2008C#+窗体+学生选课系统的设计
- C# Winform仿360窗口菜单界面程序
- C#WInfrom超市进销存管理系统
- asp.net留言板源代码(C#)
- C#编写的云南大学校园导航系统
- C#程序设计图书馆管理系统
- ASP.NET党校在线考试系统整站源码
- Visual C#网络编程 郑阿奇
- c#百款精美图片资源合集
- 库存管理系统c# + oracle
- C#销售管理系统
- 超市管理系统5.0C# SQL 需求分析+源代码
- C# 二维码生成 DLL 各个版本
- C#超市进销存销售管理系统源代码
- C# Winform毕业设计源码-音乐播放器
- C#客户信息管理系统
- c# asp.net 课程设计
- asp.net个人主页源码
- asp.net游戏门户网站源码
评论
共有 条评论