rfid图书管理系统程序源代码

上传人:第*** 文档编号:32695628 上传时间:2018-02-12 格式:DOCX 页数:73 大小:59KB
返回 下载 相关 举报
rfid图书管理系统程序源代码_第1页
第1页 / 共73页
rfid图书管理系统程序源代码_第2页
第2页 / 共73页
rfid图书管理系统程序源代码_第3页
第3页 / 共73页
rfid图书管理系统程序源代码_第4页
第4页 / 共73页
rfid图书管理系统程序源代码_第5页
第5页 / 共73页
点击查看更多>>
资源描述

《rfid图书管理系统程序源代码》由会员分享,可在线阅读,更多相关《rfid图书管理系统程序源代码(73页珍藏版)》请在金锄头文库上搜索。

1、登陆界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrarypublic partial class FormLogin : Formpublic FormLogin()InitializeComponent();/ / 验证控?件t/ / private bool ValidControl()if

2、(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)UserManage.ObjUser user= new UserMan

3、age.ObjUser(this.tbID.Text, All.dbo);if (user.PWD != this.tbPWD.Text)MessageBox.Show(密码错误!?);this.tbPWD.Text = ; this.tbPWD.Focus();return false;elseif (this.tbPWD.Text != 123456)MessageBox.Show(密码错误! );this.tbPWD.Text = ;this.tbPWD.Focus();return false;return true;private void gbtnCancel_Click(obje

4、ct sender, EventArgs e)this.Close(); private void gbtnOK_Click(object sender, EventArgs e)/如?果?验证控?件t通过yif (ValidControl()if (this.tbID.Text != admin)All.userLogin = new UserManage.ObjUser(this.tbID.Text, All.dbo);elseAll.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.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrarypublic partial class FormMain : Formpublic const int WM_U

6、SER = 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()InitializeComponent(); this.rdr = new RFID_dll.Reader();/this.rfid = new RF

7、ID_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 listScreen = new List();foreach (Screen screen in Screen.AllScreens)if (sc

8、reen.Primary = 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初?始?

9、化CToolStripMenuItem.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.t

10、oolStrip2.Visible = false;this.toolStrip3.Visible = false;/rfid.OpenSerial();/是?否?找到?门?禁?设备?/if (rfid.ChangeWorkModel(2)/ rfid.StartInventory(this.Handle.ToInt32(),2);/ / 权限设置/ private void SetPurview()if (All.userLogin.ID = admin)this.应|用?模式?ToolStripMenuItem.Visible = false;else this.用户管理ToolStrip

11、MenuItem.Visible = 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 / 门禁初始化/ private void MenJinInit()this.rfids

12、.Clear();this.directionFlag = 0;this.timer1.Tag = 0;this.timer1.Stop();private void SetMenJin(string message) this.fiao.Controls.Clear();UserControlMenJin ucmj = new UserControlMenJin(message);ucmj.Dock = DockStyle.Fill;this.fiao.Controls.Add(ucmj);private void FormMain_FormClosing(object sender, Fo

13、rmClosingEventArgs e)/this.rfid.StopInventory();/this.rfid.CloseSerial();图书统计using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrarypublic partial class FormBookStatistics : Formpr

14、ivate int boolShelf;public FormBookStatistics()InitializeComponent();BindTreeView();this.boolShelf = 0;BindListView(select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo);this.cboBookLendStatus.SelectedIndex = 0;private void BindTreeView()this.treeView1.Nodes.Clear(); TreeNode nodeR

15、oot = new TreeNode();nodeRoot.Text = 全部书架;this.treeView1.Nodes.Add(nodeRoot);for (int i = 0; i 0)if (this.cboBookLendStatus.SelectedIndex = 0)BindListView(string.Format(select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo where BookShelf=0, this.boolShelf.ToString(); if (this.cboBookLendStatus.SelectedIndex = 1)BindListView(string.Format(select

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 职业教育

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号