資源簡介
開發(fā)環(huán)境:VS2013及以上
開發(fā)語言 :C#
應(yīng)用框架 :asp.net
適用對象:
1,企業(yè):建設(shè)自己的企業(yè),微信公眾號接口系統(tǒng)
2,技術(shù)人員或站長:用來給客戶做微信公眾號接口系統(tǒng)
3,建站初學(xué)者:用作練習(xí)代碼,是很好的學(xué)習(xí)材料
4,學(xué)生:作為學(xué)習(xí)微信公眾號接口系統(tǒng)的樣例程序
5,網(wǎng)絡(luò)愛好者:當(dāng)做微信公眾號接口系統(tǒng)建設(shè)的練手工具
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Data;
using?System.Configuration;
using?System.Data.SqlClient;
using?com.index.classes.General;
using?System.Web;
using?com.index.classes.ErrorHandle;
namespace?com.index.classes.DB
{
????public?class?ConnectionPool
????{
????????//?Fields
????????public?SqlConnection?connection;
????????private?string?connectionString;
????????//?Methods
????????public?ConnectionPool()
????????{
????????????this.Init();
????????}
????????public?ConnectionPool(string?connStr)
????????{
????????????this.connectionString?=?connStr;
????????????this.Init();
????????}
????????public?void?closeConn()
????????{
????????????if?((this.connection.State?!=?ConnectionState.Broken)?|?(this.connection.State?!=?ConnectionState.Closed))
????????????{
????????????????this.connection.Close();
????????????}
????????}
????????public?void?createConn()
????????{
????????????if?((this.connection.State?==?ConnectionState.Broken)?|?(this.connection.State?==?ConnectionState.Closed))
????????????{
????????????????this.connection.Open();
????????????}
????????}
????????public?void?getConnectionString()
????????{
????????????_General?general?=?null;
???????
??????????????general?=?(_General)HttpContext.Current.Application[“_general“];
????????????this.connectionString?=?ConfigurationManager.AppSettings[“connectionStringLocalDummy“];
????????????this.connectionString?=?general.DecryptText(this.connectionString);
????????}
????????public?void?getConnectionString(string?strConn)
????????{
????????????_General?general?=?null;
????????????general?=?(_General)HttpContext.Current.Application[“_general“];
????????????this.connectionString?=?ConfigurationManager.AppSettings[strConn];
????????????this.connectionString?=?general.DecryptText(this.connectionString);
????????}
????????public?void?getMaxNoConn()
????????{
????????}
????????private?void?Init()
????????{
????????????try
????????????{
????????????????if?(string.IsNullOrEmpty(this.connectionString))
????????????????{
????????????????????this.getConnectionString();
????????????????}
????????????????this.connection?=?new?SqlConnection(this.connectionString);
????????????????this.createConn();
????????????????this.closeConn();
????????????}
????????????catch?(Exception?exception)
????????????{
????????????????new?ShowError(exception.ToString());
????????????}
????????}
????????//?Get?new?connection
????????public?SqlConnection?getConnection()
????????{
????????????return?new?SqlConnection(connectionString);
????????????//return?this.connection;
????????}
????????public?void?openSpecifyConn(SqlConnection?sqlConn)
????????{
????????????if?(sqlConn?!=?null)
????????????{
????????????????if?(sqlConn.State?==?ConnectionState.Broken?|?sqlConn.State?==?ConnectionState.Closed)
????????????????{
????????????????????sqlConn.Open();
???????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????79??2016-01-03?21:24??接口\.gitignore
?????文件??????84908??2016-01-03?21:24??接口\.vs\config\applicationhost.config
?????文件??????33280??2016-11-08?21:38??接口\com.index.classes\bin\Debug\com.index.classes.dll
?????文件?????128512??2016-11-08?21:38??接口\com.index.classes\bin\Debug\com.index.classes.pdb
?????文件??????30720??2016-03-03?12:48??接口\com.index.classes\bin\Release\com.index.classes.dll
?????文件?????103936??2016-03-03?12:48??接口\com.index.classes\bin\Release\com.index.classes.pdb
?????文件???????4756??2013-10-16?14:20??接口\com.index.classes\com.index.classes.csproj
?????文件????????257??2012-11-22?14:24??接口\com.index.classes\com.index.classes.csproj.vspscc
?????文件???????3047??2012-01-05?16:02??接口\com.index.classes\DB\ConnectionPool.cs
?????文件???????2181??2011-03-21?14:04??接口\com.index.classes\DB\ConnectionPoolOra.cs
?????文件???????3037??2011-03-21?14:04??接口\com.index.classes\DB\ConnectionPool_Dummy.cs
?????文件??????16750??2013-10-16?16:54??接口\com.index.classes\DB\SearchDataSet.cs
?????文件???????7416??2011-03-21?14:04??接口\com.index.classes\DB\SearchDataSet2.cs
?????文件??????13955??2011-03-21?14:04??接口\com.index.classes\DB\SearchDataSetOra.cs
?????文件???????5237??2011-03-21?14:04??接口\com.index.classes\DB\SearchDataSetOracle2.cs
????..A.SHR???????338??2012-03-26?10:24??接口\com.index.classes\DB\vssver2.scc
?????文件???????4517??2012-04-23?08:39??接口\com.index.classes\ErrorHandle\ShowError.cs
????..A.SHR???????122??2012-04-23?08:39??接口\com.index.classes\ErrorHandle\vssver2.scc
?????文件???????1947??2011-03-21?14:04??接口\com.index.classes\General\App_General.cs
?????文件???????2797??2011-03-21?14:04??接口\com.index.classes\General\Logic_General.cs
?????文件???????1212??2011-03-21?14:04??接口\com.index.classes\General\Session_General.cs
?????文件????????800??2011-03-21?14:04??接口\com.index.classes\General\Validators.cs
????..A.SHR???????333??2011-03-21?14:04??接口\com.index.classes\General\vssver2.scc
?????文件????????256??2011-03-21?14:04??接口\com.index.classes\General\_Application.cs
?????文件???????8923??2011-03-21?14:04??接口\com.index.classes\General\_General.cs
?????文件???????3718??2011-03-21?14:04??接口\com.index.classes\General\_Office.cs
?????文件???????1001??2011-03-21?14:04??接口\com.index.classes\General\_Session.cs
?????文件????????189??2012-07-27?10:03??接口\com.index.classes\mssccprj.scc
?????文件???????8281??2016-11-08?21:38??接口\com.index.classes\obj\Debug\com.index.classes.csproj.FileListAbsolute.txt
?????文件???????5464??2016-03-04?12:57??接口\com.index.classes\obj\Debug\com.index.classes.csprojResolveAssemblyReference.cache
............此處省略2660個文件信息
評論
共有 條評論