RFID图书管理系统程序源代码.doc
《RFID图书管理系统程序源代码.doc》由会员分享,可在线阅读,更多相关《RFID图书管理系统程序源代码.doc(47页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、. .登陆界面using System;using System.Collections.Generic;using System.ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace LabrarypublicpartialclassFormLogin : Form public FormLogin() Initializeponent(); /验证控?件t/privatebool ValidControl() if (this.tbI
2、D.Text = ) MessageBox.Show(请填写用户名!?);this.tbID.Focus();returnfalse; if (this.tbID.Text != admin) if (!UserManage.ObjUser.IsHasID(All.dbo, this.tbID.Text) MessageBox.Show(不存在此用户!?);this.tbID.Text = ;this.tbID.Focus();returnfalse; if (this.tbID.Text != admin) UserManage.ObjUser user= new UserManage.Ob
3、jUser(this.tbID.Text, All.dbo);if (user.PWD != this.tbPWD.Text) MessageBox.Show(密码错误!?);this.tbPWD.Text = ;this.tbPWD.Focus();returnfalse; else if (this.tbPWD.Text != 123456) MessageBox.Show(密码错误! );this.tbPWD.Text = ;this.tbPWD.Focus();returnfalse; returntrue; privatevoid gbtnCancel_Click(object se
4、nder, EventArgs e) this.Close(); privatevoid gbtnOK_Click(object sender, EventArgs e) /如?果?验证控?件t通过yif (ValidControl() if (this.tbID.Text != admin) All.userLogin = new UserManage.ObjUser(this.tbID.Text, All.dbo); else All.userLogin = new UserManage.ObjUser(All.dbo);All.userLogin.ID = admin;All.userL
5、ogin.Name = 管理员; this.DialogResult = DialogResult.OK;this.Close(); 主界面using System;using System.Collections.Generic;using System.ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace LabrarypublicpartialclassFormMain : Form publicconstint WM_USER =
6、 0x0400;publicconstint WM_GETBUFFER_LOOP = WM_USER + 2;private RFID_dll.Reader rdr;private RFID_dll.RFID rfid;List rfids = newList();int directionFlag = 0;/1进;出?FormInAndOut fiao = newFormInAndOut();public FormMain() Initializeponent();this.rdr = new RFID_dll.Reader();/this.rfid = new RFID_dll.RFID(
7、rdr); privatevoid FormMain_Load(object sender, EventArgs e) Init(); /初始化/privatevoid Init() fiao.StartPosition = FormStartPosition.Manual;/多窗体在不同时间显示Screen screens = Screen.AllScreens;if (screens.Length = 2) List listScreen = newList();foreach (Screen screen inScreen.AllScreens) if (screen.Primary =
8、 false) listScreen.Add(screen); fiao.Location = listScreen0.WorkingArea.Location; SetMenJin(PicIn); fiao.Show();/toolStripStatusLabel2显示登陆用户名? toolStripStatusLabel2.Text = All.userLogin.Name;this.panel1.BackgroundImage = null;/菜单栏全部显示?this.用?户管理ToolStripMenuItem.Visible = true;this.系统3初?始?化CToolStri
9、pMenuItem.Visible = true;this.应|用?模式?ToolStripMenuItem.Visible = true;this.图?书管理ToolStripMenuItem.Visible = true;this.退?办卡ToolStripMenuItem.Visible = true;this.借阅?ToolStripMenuItem.Visible = true;this.门?禁?ToolStripMenuItem.Visible = true; SetPurview();this.toolStrip1.Visible = false;this.toolStrip2.
10、Visible = false;this.toolStrip3.Visible = false;/rfid.OpenSerial();/是?否?找到?门?禁?设备?/if (rfid.ChangeWorkModel(2)/ rfid.StartInventory(this.Handle.ToInt32(),2);/ /权限设置/privatevoid SetPurview() if (All.userLogin.ID = admin) this.应|用?模式?ToolStripMenuItem.Visible = false; else this.用户管理ToolStripMenuItem.V
11、isible = false;this.系统初始化CToolStripMenuItem.Visible = false;this.读书管理ToolStripMenuItem.Visible = false;this.退办卡ToolStripMenuItem.Visible = false;this.借阅ToolStripMenuItem.Visible = false;this.门禁?ToolStripMenuItem.Visible = false;for (int i = 0; i All.userLogin.Purview.Count; i+) string purview = All.
12、userLogin.Purviewi;if (purview = 1) this.图书管理ToolStripMenuItem.Visible = true; elseif (purview = 2) this.办退卡ToolStripMenuItem.Visible = true; elseif (purview = 3) this.借阅?ToolStripMenuItem.Visible = true; elseif (purview = 4) this.门禁ToolStripMenuItem.Visible = true; privatevoid用户管理ToolStripMenuItem_
13、Click(object sender, EventArgs e) UserManage.FormUserList ful = new UserManage.FormUserList(All.conn); ful.ShowDialog(); privatevoid修改密码?ToolStripMenuItem_Click(object sender, EventArgs e) UserManage.FormUserPwd fup = new UserManage.FormUserPwd(All.conn, All.userLogin); fup.ShowDialog(); privatevoid
14、 tsbtnBookType_Click(object sender, EventArgs e) FormBookTypeList fbtl = newFormBookTypeList(); fbtl.ShowDialog(); privatevoid tsbtnBookAdd_Click(object sender, EventArgs e) FormBookAdd fba = newFormBookAdd(); fba.ShowDialog(); privatevoid tsbtnBookManage_Click(object sender, EventArgs e) FormBookIn
15、foList fbil = newFormBookInfoList(); fbil.ShowDialog(); privatevoid tsbtnBookStatistics_Click(object sender, EventArgs e) FormBookStatistics fbs = newFormBookStatistics(); fbs.ShowDialog(); privatevoid退?出?XToolStripMenuItem_Click(object sender, EventArgs e) this.Close(); privatevoid tsbtnCardAdd_Cli
16、ck(object sender, EventArgs e) FormCardInfo fci = newFormCardInfo(1, newObjCardInfo(); fci.ShowDialog(); privatevoid tsbtnCardManage_Click(object sender, EventArgs e) FormCardList fcl = newFormCardList(); fcl.ShowDialog(); privatevoid tsbtnAddTime_Click(object sender, EventArgs e) string rfid = Rfid
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- RFID 图书 管理 系统 程序 源代码
限制150内