ImageVerifierCode 换一换
格式:DOCX , 页数:59 ,大小:30.34KB ,
资源ID:5594410      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/5594410.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(RFID图书管理系统程序源代码.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

RFID图书管理系统程序源代码.docx

1、RFID图书管理系统程序源代码登陆界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrary public partial class FormLogin : Form public FormLogin() InitializeComponent(); / / 验证控?件t / / private bo

2、ol ValidControl() if (this.tbID.Text = ) MessageBox.Show(请填写用户名!?); this.tbID.Focus(); return false; if (this.tbID.Text != admin) if (!UserManage.ObjUser.IsHasID(All.dbo, this.tbID.Text) MessageBox.Show(不存在此用户!?); this.tbID.Text = ; this.tbID.Focus(); return false; if (this.tbID.Text != admin) UserM

3、anage.ObjUser user= new UserManage.ObjUser(this.tbID.Text, All.dbo); if (user.PWD != this.tbPWD.Text) MessageBox.Show(密码错误!?); this.tbPWD.Text = ; this.tbPWD.Focus(); return false; else if (this.tbPWD.Text != 123456) MessageBox.Show(密码错误! ); this.tbPWD.Text = ; this.tbPWD.Focus(); return false; retu

4、rn true; private void gbtnCancel_Click(object sender, EventArgs e) this.Close(); private void gbtnOK_Click(object sender, EventArgs e) /如?果?验证控?件t通过y if (ValidControl() if (this.tbID.Text != admin) All.userLogin = new UserManage.ObjUser(this.tbID.Text, All.dbo); else All.userLogin = new UserManage.O

5、bjUser(All.dbo); All.userLogin.ID = admin; All.userLogin.Name = 管理员; this.DialogResult = DialogResult.OK; this.Close(); 主界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrary p

6、ublic partial class FormMain : Form public const int WM_USER = 0x0400; public const int WM_GETBUFFER_LOOP = WM_USER + 2; private RFID_dll.Reader rdr; private RFID_dll.RFID rfid; List rfids = new List(); int directionFlag = 0;/1进;出? FormInAndOut fiao = new FormInAndOut(); public FormMain() Initialize

7、Component(); this.rdr = new RFID_dll.Reader(); /this.rfid = new RFID_dll.RFID(rdr); private void FormMain_Load(object sender, EventArgs e) Init(); / / 初始化 / private void Init() fiao.StartPosition = FormStartPosition.Manual; /多窗体在不同时间显示 Screen screens = Screen.AllScreens; if (screens.Length = 2) List

8、 listScreen = new List(); foreach (Screen screen in Screen.AllScreens) if (screen.Primary = false) listScreen.Add(screen); fiao.Location = listScreen0.WorkingArea.Location; SetMenJin(PicIn); fiao.Show(); /toolStripStatusLabel2显示登陆用户名? toolStripStatusLabel2.Text = All.userLogin.Name; this.panel1.Back

9、groundImage = null; /菜单栏全部显示? this.用?户管理ToolStripMenuItem.Visible = true; this.系统3初?始?化CToolStripMenuItem.Visible = true; this.应|用?模式?ToolStripMenuItem.Visible = true; this.图?书管理ToolStripMenuItem.Visible = true; this.退?办卡ToolStripMenuItem.Visible = true; this.借阅?ToolStripMenuItem.Visible = true; thi

10、s.门?禁?ToolStripMenuItem.Visible = true; SetPurview(); this.toolStrip1.Visible = false; this.toolStrip2.Visible = false; this.toolStrip3.Visible = false; /rfid.OpenSerial(); /是?否?找到?门?禁?设备? /if (rfid.ChangeWorkModel(2) / / rfid.StartInventory(this.Handle.ToInt32(),2); / / / 权限设置 / private void SetPur

11、view() if (All.userLogin.ID = admin) this.应|用?模式?ToolStripMenuItem.Visible = false; else this.用户管理ToolStripMenuItem.Visible = false; this.系统初始化CToolStripMenuItem.Visible = false; this.读书管理ToolStripMenuItem.Visible = false; this.退办卡ToolStripMenuItem.Visible = false; this.借阅ToolStripMenuItem.Visible =

12、 false; this.门禁?ToolStripMenuItem.Visible = false; for (int i = 0; i All.userLogin.Purview.Count; i+) string purview = All.userLogin.Purviewi; if (purview = 1) this.图书管理ToolStripMenuItem.Visible = true; else if (purview = 2) this.办退卡ToolStripMenuItem.Visible = true; else if (purview = 3) this.借阅?Too

13、lStripMenuItem.Visible = true; else if (purview = 4) this.门禁ToolStripMenuItem.Visible = true; private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e) UserManage.FormUserList ful = new UserManage.FormUserList(All.conn); ful.ShowDialog(); private void 修改密码?ToolStripMenuItem_Click(object s

14、ender, EventArgs e) UserManage.FormUserPwd fup = new UserManage.FormUserPwd(All.conn, All.userLogin); fup.ShowDialog(); private void tsbtnBookType_Click(object sender, EventArgs e) FormBookTypeList fbtl = new FormBookTypeList(); fbtl.ShowDialog(); private void tsbtnBookAdd_Click(object sender, Event

15、Args e) FormBookAdd fba = new FormBookAdd(); fba.ShowDialog(); private void tsbtnBookManage_Click(object sender, EventArgs e) FormBookInfoList fbil = new FormBookInfoList(); fbil.ShowDialog(); private void tsbtnBookStatistics_Click(object sender, EventArgs e) FormBookStatistics fbs = new FormBookSta

16、tistics(); fbs.ShowDialog(); private void 退?出?XToolStripMenuItem_Click(object sender, EventArgs e) this.Close(); private void tsbtnCardAdd_Click(object sender, EventArgs e) FormCardInfo fci = new FormCardInfo(1, new ObjCardInfo(); fci.ShowDialog(); private void tsbtnCardManage_Click(object sender, E

17、ventArgs e) FormCardList fcl = new FormCardList(); fcl.ShowDialog(); private void tsbtnAddTime_Click(object sender, EventArgs e) string rfid = RfidOperate.GetCard(); if (rfid = ) MessageBox.Show(请把借阅卡放到桌面读写器上!); else if (ObjCardInfo.IsHas(rfid) ObjCardInfo oci = new ObjCardInfo(rfid); FormCardInfo f

18、ci = new FormCardInfo(5, oci); fci.ShowDialog(); else MessageBox.Show(没有此借阅卡信息); private void tsbtnCardDelete_Click(object sender, EventArgs e) string rfid = RfidOperate.GetCard(); if (rfid = ) MessageBox.Show(请把借阅卡到读写器上?); else if (ObjCardInfo.IsHas(rfid) ObjCardInfo oci = new ObjCardInfo(rfid); in

19、t count = oci.NotReturnCount(); if (count = 0) if (MessageBox.Show(是否决定退卡!?, , MessageBoxButtons.YesNo) = DialogResult.Yes) oci.Delete(); MessageBox.Show(退卡成功|!?); else MessageBox.Show(oci.Name + 还有一本 + count.ToString() + 本书未归还不能退卡?); else MessageBox.Show(没有此借阅信息?); private void tsbtnJie_Click(objec

20、t sender, EventArgs e) FormBookJie fbj = new FormBookJie(1); fbj.ShowDialog(); private void tsbtnHuan_Click(object sender, EventArgs e) FormBookHuan fbh = new FormBookHuan(); fbh.ShowDialog(); private void 图?书管理ToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = true; this.

21、toolStrip2.Visible = false; this.toolStrip3.Visible = false; this.panel1.BackgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + pic1.jpg); private void 退?办卡ToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = false; this.toolStrip2.Visible = true; this.tool

22、Strip3.Visible = false; this.panel1.BackgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + pic2.jpg); private void 借阅?ToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = false; this.toolStrip2.Visible = false; this.toolStrip3.Visible = true; this.panel1.Ba

23、ckgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + pic3.jpg); private void 门?禁?ToolStripMenuItem_Click(object sender, EventArgs e) /MenJinInit(); /this.toolStrip1.Visible = false; /this.toolStrip2.Visible = false; /this.toolStrip3.Visible = false; /this.panel1.BackgroundImage = n

24、ull; /rfid.OpenSerial(); /是否找到门禁设备? /if (rfid.IsOpen) / / rfid.StartInventory(this.Handle.ToInt32(); / private void 注销ToolStripMenuItem_Click(object sender, EventArgs e) All.userLogin = null; FormLogin fl = new FormLogin(); if (fl.ShowDialog() != DialogResult.OK) this.Close(); else Init(); private v

25、oid 帮助ToolStripMenuItem1_Click(object sender, EventArgs e) private void 系统初始化CToolStripMenuItem_Click(object sender, EventArgs e) if (MessageBox.Show(是否初始化数据库?, , MessageBoxButtons.YesNo) = DialogResult.Yes) All.dbo.excuteSql(delete from lendtable); All.dbo.excuteSql(delete from bookinfo); All.dbo.e

26、xcuteSql(delete from booktype); All.dbo.excuteSql(delete from librarycard); All.dbo.excuteSql(delete from usertable); MessageBox.Show(初始化完成?); private void 关于ToolStripMenuItem_Click(object sender, EventArgs e) FormAbout fa = new FormAbout(); fa.ShowDialog(); protected override void DefWndProc(ref Sy

27、stem.Windows.Forms.Message m) if (m.Msg = WM_GETBUFFER_LOOP) /启动 if (this.timer1.Tag.ToString() = 0) this.timer1.Start(); this.timer1.Tag = 1; string uid = ; string direction = ; bool personWithMultCard = false; rdr.GetLoopGetBufferData(m, ref uid, ref direction, ref personWithMultCard); if (uid !=

28、0000000000000000) /进 if (direction = In) this.directionFlag = 1; this.rfids.Add(uid); /出 if (direction = Out) this.directionFlag = 2; this.rfids.Add(uid); if (uid = FFFFFFFFFFFFFFFF) base.DefWndProc(ref m); private void timer1_Tick(object sender, EventArgs e) if (this.directionFlag = 1) for (int i = 0; i this.rfids.Count; i+) if (

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1