資源簡介
基于web投票系統(附論文)源碼
源碼描述:
三層架構
用戶注冊登陸,發起投票,管理自己的投票,查看并投票,圖表形式顯示投票結果
添加、管理好友,查看好友的投票,修改登陸密碼。
管理員可以通過后臺對會員,投票進行管理,查看投票結果。
默認用戶登錄名:test@qq.com 密碼:test

代碼片段和文件信息
using?System;
using?System.Data;
using?System.Collections.Generic;
using?Maticsoft.Common;
using?VOTE.Model;
namespace?VOTE.BLL
{
///?
///?admin
///?
public?partial?class?admin
{
private?readonly?VOTE.DAL.admin?dal=new?VOTE.DAL.admin();
public?admin()
{}
#region??Method
///?
///?得到最大ID
///?
public?int?GetMaxId()
{
return?dal.GetMaxId();
}
///?
///?是否存在該記錄
///?
public?bool?Exists(int?aid)
{
return?dal.Exists(aid);
}
///?
///?增加一條數據
///?
public?int??Add(VOTE.Model.admin?model)
{
return?dal.Add(model);
}
///?
///?更新一條數據
///?
public?bool?Update(VOTE.Model.admin?model)
{
return?dal.Update(model);
}
///?
///?刪除一條數據
///?
public?bool?Delete(int?aid)
{
return?dal.Delete(aid);
}
///?
///?刪除一條數據
///?
public?bool?DeleteList(string?aidlist?)
{
return?dal.DeleteList(aidlist?);
}
///?
///?得到一個對象實體
///?
public?VOTE.Model.admin?GetModel(int?aid)
{
return?dal.GetModel(aid);
}
///?
///?得到一個對象實體,從緩存中
///?
public?VOTE.Model.admin?GetModelByCache(int?aid)
{
string?CacheKey?=?“adminModel-“?+?aid;
object?objModel?=?Maticsoft.Common.DataCache.GetCache(CacheKey);
if?(objModel?==?null)
{
try
{
objModel?=?dal.GetModel(aid);
if?(objModel?!=?null)
{
int?ModelCache?=?Maticsoft.Common.ConfigHelper.GetConfigInt(“ModelCache“);
Maticsoft.Common.DataCache.SetCache(CacheKey?objModel?DateTime.Now.AddMinutes(ModelCache)?TimeSpan.Zero);
}
}
catch{}
}
return?(VOTE.Model.admin)objModel;
}
///?
///?獲得數據列表
///?
public?DataSet?GetList(string?strWhere)
{
return?dal.GetList(strWhere);
}
///?
///?獲得前幾行數據
///?
public?DataSet?GetList(int?Topstring?strWherestring?filedOrder)
{
return?dal.GetList(TopstrWherefiledOrder);
}
///?
///?獲得數據列表
///?
public?List?GetModelList(string?strWhere)
{
DataSet?ds?=?dal.GetList(strWhere);
return?DataTableToList(ds.Tables[0]);
}
///?
///?獲得數據列表
///?
public?List?DataTableToList(DataTable?dt)
{
List?modelList?=?new?List();
int?rowsCount?=?dt.Rows.Count;
if?(rowsCount?>?0)
{
VOTE.Model.admin?model;
for?(int?n?=?0;?n? {
model?=?new?VOTE.Model.admin();
if(dt.Rows[n][“aid“].ToString()!=““)
{
model.aid=int.Parse(dt.Rows[n][“aid“].ToString());
}
model.uname=dt.Rows[n][“uname“].ToString();
model.pwd=dt.Rows[n][“pwd“].ToString();
modelList.Add(model);
}
}
re
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-05-07?17:51??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\
?????文件????????3460??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\admin.cs
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\bin\
?????目錄???????????0??2013-11-14?09:32??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\bin\Debug\
?????文件????????6878??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\BLL.csproj
?????文件????????2543??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\BLL.csproj.user
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\
?????目錄???????????0??2013-11-14?09:32??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\Debug\
?????文件????????4177??2013-11-14?09:32??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\Debug\BLL.csproj.FileListAbsolute.txt
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\Debug\Refactor\
?????文件???????16384??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\Debug\Refactor\VOTE.BLL.dll
?????目錄???????????0??2013-11-13?09:24??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\obj\Debug\TempPE\
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\Properties\
?????文件?????????609??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\Properties\AssemblyInfo.cs
?????文件????????1627??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\SysManage.cs
?????文件????????4354??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\users.cs
?????文件????????4075??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\users_friend.cs
?????文件????????3913??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\votes.cs
?????文件????????3843??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\votes_detial.cs
?????文件????????3906??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\BLL\votes_tp.cs
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\
?????文件????????1117??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\Assistant.cs
?????目錄???????????0??2011-11-02?11:31??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\bin\
?????目錄???????????0??2013-11-14?09:32??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\bin\Debug\
?????文件???????21865??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\ChartHelper.cs
?????文件????????7630??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\Common.csproj
?????文件????????2450??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\Common.csproj.user
?????文件????????2462??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\ConfigHelper.cs
?????文件????????1263??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\DataCache.cs
?????文件???????15929??2011-11-02?11:30??hpxvote_2169463f-768b-41c8-9e4e-fd794005c78e\Common\DataToExcel.cs
............此處省略607個文件信息
評論
共有 條評論