用C#做的一个比较简单实用的门禁卡读卡程序,在单位实际环境中使用,隐私原因删除了一些图片文件,参照时可以用其他的图片补齐。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2030 2017-09-13 15:10 新建文件夹外来人员登记系统App.config
文件 18695 2018-03-07 09:56 新建文件夹外来人员登记系统B.cs
文件 35843 2018-03-07 09:56 新建文件夹外来人员登记系统B.Designer.cs
文件 6011 2018-03-07 09:56 新建文件夹外来人员登记系统B.resx
文件 4286 2014-12-16 16:15 新建文件夹外来人员登记系统itbug_favicon.ico
文件 3543552 2009-11-06 09:49 新建文件夹外来人员登记系统DevComponents.DotNetBar2.dll
文件 4330 2017-08-29 08:41 新建文件夹外来人员登记系统DevicesaseCardRW.cs
文件 3378 2017-08-29 08:43 新建文件夹外来人员登记系统DevicesDemoCardRW.cs
文件 625 2017-08-29 08:40 新建文件夹外来人员登记系统DevicesDevicebase.cs
文件 3520 2017-08-29 08:58 新建文件夹外来人员登记系统DevicesDeviceManager.cs
文件 1433 2017-08-29 08:58 新建文件夹外来人员登记系统DevicesSM7CardRW.cs
文件 221184 2007-03-12 15:58 新建文件夹外来人员登记系统Dewlt.dll
文件 10240 2014-12-12 06:49 新建文件夹外来人员登记系统HDF12Driver.dll
文件 48640 2014-10-14 10:18 新建文件夹外来人员登记系统hdrf32.dll
文件 335360 2011-06-02 10:35 新建文件夹外来人员登记系统JpgDll.dll
文件 5592 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.cs
文件 4639 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.Designer.cs
文件 12919 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.resx
文件 424960 2018-01-19 15:28 新建文件夹外来人员登记系统MySql.Data.dll
文件 9552 2018-03-07 10:02 新建文件夹外来人员登记系统PersonalRegister.csproj
文件 565 2017-09-04 09:48 新建文件夹外来人员登记系统PersonalRegister.csproj.user
文件 1732 2017-09-04 09:54 新建文件夹外来人员登记系统PersonalRegister_TemporaryKey.pfx
文件 574 2017-08-31 14:42 新建文件夹外来人员登记系统Program.cs
文件 1396 2017-08-28 09:58 新建文件夹外来人员登记系统PropertiesAssemblyInfo.cs
文件 3248 2017-09-04 15:55 新建文件夹外来人员登记系统PropertiesResources.Designer.cs
文件 6195 2017-09-04 15:55 新建文件夹外来人员登记系统PropertiesResources.resx
文件 2268 2017-09-04 09:48 新建文件夹外来人员登记系统PropertiesSettings.Designer.cs
文件 1670 2017-09-04 09:48 新建文件夹外来人员登记系统PropertiesSettings.settings
文件 11469 2017-09-21 15:54 新建文件夹外来人员登记系统Report.cs
文件 17067 2017-09-19 15:36 新建文件夹外来人员登记系统Report.Designer.cs
............此处省略33个文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using HDF12Driver;
using PersonalRegister.Devices;
using PersonalRegister.SQLHelp;
using System.Net;
namespace PersonalRegister
{
public partial class B : Form
{
private Size beforeResizeSize = Size.Empty;
public B()
{
InitializeComponent();
}
private void buttonX3_Click(object sender EventArgs e)
{
this.WXPhoto.Image = null;
}
private void buttonX4_Click(object sender EventArgs e)
{
long uid = 0;
long tempUid = -100;
DeviceManager deviceManager = new DeviceManager();
if (!deviceManager.CardRW.Init())
{
//continue;
MessageBox.Show(“初始化读卡器失败!“);
}
uid = deviceManager.CardRW.FindCard();
if (uid < 0)
{
tempUid = -1;
}
this.textBoxX1.Text = uid.ToString();
deviceManager.CardRW.Exit();
//if (count > 10)
//{
// break;
}
private void buttonX5_Click(object sender EventArgs e)
{
string buttonText=““;
//this.buttonX5.UseWaitCursor = true;
buttonText=this.buttonX5.Text;
this.buttonX5.Text=“读取中.....“;
this.buttonX5.Enabled = false;
long uid = 0;
long tempUid = -100;
DeviceManager deviceManager = new DeviceManager();
if (!deviceManager.CardRW.Init())
{
//continue;
MessageBox.Show(“初始化读卡器失败!“);
}
uid = deviceManager.CardRW.FindCard();
if (uid < 0)
{
tempUid = -1;
MessageBox.Show(“请确认是否放入执勤卡并重新点击读取!“);
}
else
{
getPoliceInfoByUid(uid.ToString());
}
this.textBoxX1.Text = uid.ToString();
deviceManager.CardRW.Exit();
//if (count > 10)
//{
// break;
//this.UseWaitCursor = false;
this.buttonX5.Text = buttonText;
this.buttonX5.Enabled = true;
}
private void getPoliceInfoByUid(string uid)
{
DataTable dt = null;
Image O_Image=null;
string sql = “select * from CardPersonalInfoDepartMent where PersonalInfo.personalType=1 and PersonalInfo.Id=card.PersonId and PersonalInfo.DepartmentId=DepartMent.Id and Card.Uid=‘“ + uid + “‘“;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2030 2017-09-13 15:10 新建文件夹外来人员登记系统App.config
文件 18695 2018-03-07 09:56 新建文件夹外来人员登记系统B.cs
文件 35843 2018-03-07 09:56 新建文件夹外来人员登记系统B.Designer.cs
文件 6011 2018-03-07 09:56 新建文件夹外来人员登记系统B.resx
文件 4286 2014-12-16 16:15 新建文件夹外来人员登记系统itbug_favicon.ico
文件 3543552 2009-11-06 09:49 新建文件夹外来人员登记系统DevComponents.DotNetBar2.dll
文件 4330 2017-08-29 08:41 新建文件夹外来人员登记系统Devicesa
文件 3378 2017-08-29 08:43 新建文件夹外来人员登记系统DevicesDemoCardRW.cs
文件 625 2017-08-29 08:40 新建文件夹外来人员登记系统DevicesDeviceba
文件 3520 2017-08-29 08:58 新建文件夹外来人员登记系统DevicesDeviceManager.cs
文件 1433 2017-08-29 08:58 新建文件夹外来人员登记系统DevicesSM7CardRW.cs
文件 221184 2007-03-12 15:58 新建文件夹外来人员登记系统Dewlt.dll
文件 10240 2014-12-12 06:49 新建文件夹外来人员登记系统HDF12Driver.dll
文件 48640 2014-10-14 10:18 新建文件夹外来人员登记系统hdrf32.dll
文件 335360 2011-06-02 10:35 新建文件夹外来人员登记系统JpgDll.dll
文件 5592 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.cs
文件 4639 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.Designer.cs
文件 12919 2017-09-13 11:39 新建文件夹外来人员登记系统MDIParent1.resx
文件 424960 2018-01-19 15:28 新建文件夹外来人员登记系统MySql.Data.dll
文件 9552 2018-03-07 10:02 新建文件夹外来人员登记系统PersonalRegister.csproj
文件 565 2017-09-04 09:48 新建文件夹外来人员登记系统PersonalRegister.csproj.user
文件 1732 2017-09-04 09:54 新建文件夹外来人员登记系统PersonalRegister_TemporaryKey.pfx
文件 574 2017-08-31 14:42 新建文件夹外来人员登记系统Program.cs
文件 1396 2017-08-28 09:58 新建文件夹外来人员登记系统PropertiesAssemblyInfo.cs
文件 3248 2017-09-04 15:55 新建文件夹外来人员登记系统PropertiesResources.Designer.cs
文件 6195 2017-09-04 15:55 新建文件夹外来人员登记系统PropertiesResources.resx
文件 2268 2017-09-04 09:48 新建文件夹外来人员登记系统PropertiesSettings.Designer.cs
文件 1670 2017-09-04 09:48 新建文件夹外来人员登记系统PropertiesSettings.settings
文件 11469 2017-09-21 15:54 新建文件夹外来人员登记系统Report.cs
文件 17067 2017-09-19 15:36 新建文件夹外来人员登记系统Report.Designer.cs
............此处省略33个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)