iDBManage2000.cs
上传用户:hbbfjy2008
上传日期:2015-02-05
资源大小:5616k
文件大小:1k
- using System;
- using System.Web;
- using System.Web.SessionState ;
- using System.Data;
- using System.Data.SqlClient;
- using System.Configuration;
- namespace iWebOffice.ocx.c.net
- {
- /// <summary>
- /// iDBManage2000 的摘要说明。
- /// </summary>
- public class iDBManage2000
- {
- public string Connectionstring;
- public SqlConnection Connection;
- public iDBManage2000()
- {
- //Connectionstring="data source=localhost;initial catalog=DBDemo;password=dbdemo;persist security info=True;user id=dbdemo;workstation id=SERVER;packet size=4096";
- Connectionstring=ConfigurationSettings.AppSettings["Connectionstring"];
- }
- public void Open()
- {
-
- Connection = new SqlConnection(Connectionstring);
- Connection.Open();
- }
- public void Close()
- {
- Connection.Close() ;
- }
- public string GetDateTime()
- {
- System.DateTime SystemTime;
- SystemTime=DateTime.Now;
-
- return (SystemTime.ToString("yyyy-MM-dd HH:mm:ss"));
- }
- }
- }