资源简介
后台设置投票内容、开始结束时间(设置投票的开始结束时间,前台显示)、投票方式等。
前台显示投票内容列表,进行投票,并显示投票结果,防止重复投票。

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAL;
namespace BLL
{
public class SqlAdmin
{
public bool checkin(string namestring password)
{
string sql = “select * from manage where aname=‘“ + name + “‘ and apassword =‘“ + password + “‘“;
SqlDataReader dr = DBOperation.getReader(sql);
if (dr.Read())
{
return true;
}
return false;
}
public bool insert(string name)
{
string sql = “select * from manage where aname=‘“ + name + “‘“;
SqlDataReader dr = DBOperation.getReader(sql);
if (dr.Read())
{
return true;
}
return false;
}
public bool checkup(string namestring id)
{
string sql = “select * from manage where aname=‘“ + name + “‘and id!=“+id;
SqlDataReader dr = DBOperation.getReader(sql);
if (dr.Read())
{
return true;
}
return false;
}
public DataSet FindAll()
{
string sql = “select * from manage“;
return DBOperation.getDataSet(sql “manage“);
}
public adm FindByid(string id)
{
string sql = “select * from manage where id=“ + id;
DataSet ds = DBOperation.getDataSet(sql “manage“);
adm a = new adm();
a.Aname = ds.Tables[0].Rows[0][1].ToString();
a.Apassword = ds.Tables[0].Rows[0][2].ToString();
return a;
}
public void Delete(string id)
{
string sql = “delete from manage where id=“ + id;
DBOperation.execSQL(sql);
}
public DataSet Find(adm a)//
{
string sql;
sql = “select * from manage where id >‘“ + 0 + “‘“;
if (a.Aname != ““)
sql += “ and aname like ‘%“ + a.Aname + “%‘“;
if (a.Apassword != ““)
sql += “ and aname like ‘“ + a.Apassword + “‘“;
return DBOperation.getDataSet(sql “Administrator“);
}
public int update(adm a)
{
string sql = “update manage set aname=‘“ + a.Aname + “‘apassword=‘“ + a.Apassword + “‘where id=‘“+a.Id+“‘“;
int num = DBOperation.execSQL(sql);
return num;
}
public void add(adm a)
{
string sql = “insert into manage(anameapassword) values(‘“ + a.Aname + “‘‘“ + a.Apassword + “‘)“;
DBOperation.execSQL(sql);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 11776 2012-10-27 21:03 VoteSystem\BLL\bin\Debug\BLL.dll
文件 46592 2012-10-27 21:03 VoteSystem\BLL\bin\Debug\BLL.pdb
文件 8192 2012-10-27 21:03 VoteSystem\BLL\bin\Debug\DAL.dll
文件 52736 2012-10-27 21:03 VoteSystem\BLL\bin\Debug\DAL.pdb
文件 2653 2012-06-17 00:39 VoteSystem\BLL\BLL.csproj
文件 1872 2012-10-27 21:03 VoteSystem\BLL\obj\Debug\BLL.csproj.FileListAbsolute.txt
文件 11776 2012-10-27 21:03 VoteSystem\BLL\obj\Debug\BLL.dll
文件 46592 2012-10-27 21:03 VoteSystem\BLL\obj\Debug\BLL.pdb
文件 5680 2012-10-27 21:03 VoteSystem\BLL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 9981 2012-10-27 21:03 VoteSystem\BLL\obj\Debug\ResolveAssemblyReference.cache
文件 1338 2012-06-08 08:41 VoteSystem\BLL\Properties\AssemblyInfo.cs
文件 2857 2012-06-18 10:19 VoteSystem\BLL\SqlAdmin.cs
文件 2229 2012-06-18 01:00 VoteSystem\BLL\SqlOperation.cs
文件 2352 2012-06-18 11:14 VoteSystem\BLL\SqlOption.cs
文件 1704 2012-06-17 00:16 VoteSystem\BLL\SqlUsers.cs
文件 1470 2012-06-18 08:45 VoteSystem\BLL\SqlVote.cs
文件 619 2012-06-18 10:19 VoteSystem\DAL\adm.cs
文件 8192 2012-10-27 21:03 VoteSystem\DAL\bin\Debug\DAL.dll
文件 52736 2012-10-27 21:03 VoteSystem\DAL\bin\Debug\DAL.pdb
文件 2489 2012-06-15 15:50 VoteSystem\DAL\DAL.csproj
文件 2253 2012-06-17 00:45 VoteSystem\DAL\DBOperation.cs
文件 1370 2012-10-27 21:03 VoteSystem\DAL\obj\Debug\DAL.csproj.FileListAbsolute.txt
文件 8192 2012-10-27 21:03 VoteSystem\DAL\obj\Debug\DAL.dll
文件 52736 2012-10-27 21:03 VoteSystem\DAL\obj\Debug\DAL.pdb
文件 5615 2012-10-27 21:03 VoteSystem\DAL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 1338 2012-06-08 08:41 VoteSystem\DAL\Properties\AssemblyInfo.cs
文件 1460 2012-06-12 11:03 VoteSystem\DAL\randomCode.cs
文件 638 2012-06-12 11:03 VoteSystem\DAL\users.cs
文件 768 2012-06-08 16:44 VoteSystem\DAL\vote_ti
文件 955 2012-06-15 15:47 VoteSystem\DAL\xoption.cs
............此处省略164个文件信息
- 上一篇:傅里叶变换程序
- 下一篇:IDL入门教程带实习操作文件
相关资源
- bp神经网络源代码,可直接运行
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- WPF USB 网络 串口 通信软件
- dotnet 写字板 实验 源代码 不好请要不
- 一个超简单的企业管理系统(带ACCE
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- B/S 网上订餐系统
- linux应用层的华容道游戏源代码
- 网上拍卖系统完整源代码
- 教室管理系统.rar
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- 小鸡快跑游戏.
- STM32F103 串口程序(完整版)
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- 透明加密源码及说明
-
分别适用于.NET fr
amework 2.0和4.0的E - 排队机叫号 源代码
- 五子棋C 源代码
- CAD LISP24个源代码
- 汽车租赁系统............................
- 二叉树基本操作源代码
- 推箱子及人工智能寻路C 源代码
- opengl轮廓字体源代码
- 冈萨雷斯 数字图像处理 源代码(m文
评论
共有 条评论