資源簡介
八個ASP的系統,適合初學者研究學習,附上使用說明文檔,數據庫和客戶端都已設計好。

代碼片段和文件信息
namespace?student1
{
using?System;
using?System.Collections;
using?System.ComponentModel;
using?System.Data;
using?System.Data.SqlClient;
using?System.Drawing;
using?System.Web;
using?System.Web.SessionState;
using?System.Web.UI;
using?System.Web.UI.WebControls;
using?System.Web.UI.HtmlControls;
using?System.Configuration;
//定義PositionData類
public?class?PositionData?
{
????????
private?string?name;
private?string?CatID;
public?PositionData(string?Name?string?CategoryID)?
{
this.name?=?Name;
this.CatID?=?CategoryID;
}
public?string?Name?
{
get?
{
return?name;
}
}
public?string?CategoryID?
{
get?
{
return?CatID;
}
}
}
//定義CCUtility類
public?class?CCUtility?
{
public?const?int?FIELD_TYPE_Text?=?0;
public?const?int?FIELD_TYPE_Number?=?1;
public?const?int?FIELD_TYPE_Date?=?2;
public?const?int?FIELD_TYPE_Memo?=?3;
protected?HttpSessionState?Session;
protected?HttpServerUtility?Server;
protected?HttpRequest?Request;
protected?HttpResponse?Response;
//轉換為標準的SQL語句
public?static?string?ToSQL(string?Param?int?iType)?
{
if?(Param?==?null?||?Param.Length?==?0)?
{
return?“Null“;
}?
else?
{
string?str?=?Quote(Param);
if?(iType?==?FIELD_TYPE_Number)?
{
return?str.Replace(‘‘‘.‘);
}?
else?
{
return?“\‘“?+?str?+?“\‘“;
}
}
}
//構造函數
public?CCUtility(object?parent)
{
DBOpen();
try
{
Session=((System.Web.UI.Page)parent).Session;
Server=((System.Web.UI.Page)parent).Server;
Request=((System.Web.UI.Page)parent).Request;
Response=((System.Web.UI.Page)parent).Response;
}
catch
{
Session=((System.Web.UI.UserControl)parent).Session;
Server=((System.Web.UI.UserControl)parent).Server;
Request=((System.Web.UI.UserControl)parent).Request;
Response=((System.Web.UI.UserControl)parent).Response;
}
}?
public?String?GetValFromLOV(String?val?String[]?arr)?
{
String?ret?=?““;
if?(arr.Length?%?2?==?0)?
{
int?temp=Array.IndexOf(arrval);
ret=temp==-1?““:arr[temp+1];}
return?ret;
}
//判斷數據類型是否為數值型
public?bool?IsNumeric(object?source?string?value)?
{
try
{
Decimal?temp=Convert.ToDecimal(value);
return?true;
}
catch?
{
return?false;
}
}
//單引號替換為雙引號
public?static?string?Quote(string?Param)?
{
if?(Param?==?null?||?Param.Length?==?0)?
{
return?““;
}?
else?
{
return?Param.Replace(“‘““‘‘“);
}
}
//獲得DataRow對象中row中的field值
public?static?string?GetValue(DataRow?row?string?field)?
{
if?(row[field].ToString()?==?null)
return?““;
else
return?row[field].ToString();
}
//與數據庫連接方法的定義
public?SqlConnection?Connection;
//建立一個數據集
public?DataSet?FillDataSet(string?sSQL)
{
DataSet?ds?=?new?DataSe
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-03-14?18:04??ASP\
?????目錄???????????0??2014-03-14?18:04??ASP\Char03\
?????目錄???????????0??2014-03-14?18:04??ASP\Char03\databa
?????文件?????1198592??2005-04-23?15:46??ASP\Char03\databa
?????文件?????????309??2005-09-21?16:55??ASP\Char03\readme.txt
?????目錄???????????0??2014-03-14?18:04??ASP\Char03\student1\
?????目錄???????????0??2014-03-14?18:04??ASP\Char03\student1\bin\
?????文件???????53248??2005-03-25?18:06??ASP\Char03\student1\bin\student1.dll
?????文件??????114176??2005-03-25?18:06??ASP\Char03\student1\bin\student1.pdb
?????目錄???????????0??2014-03-14?18:04??ASP\Char03\student1\bin\_vti_cnf\
?????文件?????????112??2005-03-17?10:12??ASP\Char03\student1\bin\_vti_cnf\student1.dll
?????文件?????????112??2005-03-17?10:12??ASP\Char03\student1\bin\_vti_cnf\student1.pdb
?????文件????????7983??2005-03-17?14:39??ASP\Char03\student1\CCUtility.cs
?????文件????????2386??2005-03-22?17:53??ASP\Char03\student1\class.aspx
?????文件????????4251??2005-04-19?14:43??ASP\Char03\student1\class.aspx.cs
?????文件????????5317??2005-03-22?17:16??ASP\Char03\student1\class.aspx.resx
?????文件????????2218??2005-03-23?15:24??ASP\Char03\student1\classedit.aspx
?????文件????????7331??2005-03-23?15:24??ASP\Char03\student1\classedit.aspx.cs
?????文件????????5317??2005-03-23?09:28??ASP\Char03\student1\classedit.aspx.resx
?????文件????????8329??2005-03-21?15:05??ASP\Char03\student1\default.aspx
?????文件???????12104??2005-03-21?15:39??ASP\Char03\student1\default.aspx.cs
?????文件????????5317??2005-03-19?14:02??ASP\Char03\student1\default.aspx.resx
?????文件?????????342??2005-03-29?08:22??ASP\Char03\student1\footer.ascx
?????文件?????????859??2005-03-15?15:56??ASP\Char03\student1\footer.ascx.cs
?????文件????????1733??2002-01-30?13:04??ASP\Char03\student1\footer.ascx.resx
?????文件??????????75??2005-03-15?14:40??ASP\Char03\student1\Global.asax
?????文件????????1374??2005-03-15?14:40??ASP\Char03\student1\Global.asax.cs
?????文件????????1733??2002-01-30?13:04??ASP\Char03\student1\Global.asax.resx
?????文件????????1324??2005-03-18?11:41??ASP\Char03\student1\header.ascx
?????文件????????1118??2005-03-18?11:20??ASP\Char03\student1\header.ascx.cs
?????文件????????5317??2005-03-18?11:20??ASP\Char03\student1\header.ascx.resx
............此處省略602個文件信息
- 上一篇:物性查詢軟件V1.4.0(源代碼).rar
- 下一篇:ASP開發的美食網源代碼
評論
共有 條評論