欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

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

    • 资源ID:12998693       资源大小:187KB        全文页数:47页
    • 资源格式: DOC        下载积分:9金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要9金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

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

    . .登陆界面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(); /<summary>/验¨¦证¡è控?件t/</summary>/<returns></returns>privatebool ValidControl() if (this.tbID.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.ObjUser(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 sender, 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.userLogin.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 = 0x0400;publicconstint WM_GETBUFFER_LOOP = WM_USER + 2;private RFID_dll.Reader rdr;private RFID_dll.RFID rfid;List<string> rfids = newList<string>();int directionFlag = 0;/1进;出?FormInAndOut fiao = newFormInAndOut();public FormMain() Initializeponent();this.rdr = new RFID_dll.Reader();/this.rfid = new RFID_dll.RFID(rdr); privatevoid FormMain_Load(object sender, EventArgs e) Init(); /<summary>/初始化/</summary>privatevoid Init() fiao.StartPosition = FormStartPosition.Manual;/多窗体在不同时间显示Screen screens = Screen.AllScreens;if (screens.Length = 2) List<Screen> listScreen = newList<Screen>();foreach (Screen screen inScreen.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.BackgroundImage = 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;this.门?禁?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);/ /<summary>/权限设置/</summary>privatevoid SetPurview() 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 = 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; elseif (purview = "2") this.办退卡¡§ToolStripMenuItem.Visible = true; elseif (purview = "3") this.借阅?ToolStripMenuItem.Visible = true; elseif (purview = "4") this.门禁ToolStripMenuItem.Visible = true; privatevoid用户管理¨ªToolStripMenuItem_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 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) FormBookInfoList 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_Click(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 = RfidOperate.GetCard();if (rfid = "") MessageBox.Show("请把借阅卡放到桌面读写器上!"); else if (ObjCardInfo.IsHas(rfid) ObjCardInfo oci = newObjCardInfo(rfid);FormCardInfo fci = newFormCardInfo(5, oci); fci.ShowDialog(); else MessageBox.Show("没有此借阅卡信息"); privatevoid tsbtnCardDelete_Click(object sender, EventArgs e) string rfid = RfidOperate.GetCard();if (rfid = "") MessageBox.Show("请把借阅卡到读写器上?"); else if (ObjCardInfo.IsHas(rfid) ObjCardInfo oci = newObjCardInfo(rfid);int 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("没有此借阅信息?"); privatevoid tsbtnJie_Click(object sender, EventArgs e) FormBookJie fbj = newFormBookJie(1); fbj.ShowDialog(); privatevoid tsbtnHuan_Click(object sender, EventArgs e) FormBookHuan fbh = newFormBookHuan(); fbh.ShowDialog(); privatevoid图ª?书º¨¦管¨¹理¤¨ªToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = true;this.toolStrip2.Visible = false;this.toolStrip3.Visible = false;this.panel1.BackgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + "pic1.jpg"); privatevoid退ª?办㨬卡¡§ToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = false;this.toolStrip2.Visible = true;this.toolStrip3.Visible = false;this.panel1.BackgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + "pic2.jpg"); privatevoid借¨¨阅?ToolStripMenuItem_Click(object sender, EventArgs e) this.toolStrip1.Visible = false;this.toolStrip2.Visible = false;this.toolStrip3.Visible = true;this.panel1.BackgroundImage = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + "pic3.jpg"); privatevoid门?禁?ToolStripMenuItem_Click(object sender, EventArgs e) /MenJinInit();/this.toolStrip1.Visible = false;/this.toolStrip2.Visible = false;/this.toolStrip3.Visible = false;/this.panel1.BackgroundImage = null;/rfid.OpenSerial();/是否找到门禁设备?/if (rfid.IsOpen)/ rfid.StartInventory(this.Handle.ToInt32();/ privatevoid注销²ToolStripMenuItem_Click(object sender, EventArgs e) All.userLogin = null;FormLogin fl = newFormLogin();if (fl.ShowDialog() != DialogResult.OK) this.Close(); else Init(); privatevoid帮助¨²ToolStripMenuItem1_Click(object sender, EventArgs e) privatevoid系统初始化¡¥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.excuteSql("delete from booktype");All.dbo.excuteSql("delete from librarycard");All.dbo.excuteSql("delete from usertable");MessageBox.Show("初始化完成?"); privatevoid关于ToolStripMenuItem_Click(object sender, EventArgs e) FormAbout fa = newFormAbout(); fa.ShowDialog(); protectedoverridevoid DefWndProc(ref System.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 != "00000") /进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); privatevoid timer1_Tick(object sender, EventArgs e) if (this.directionFlag = 1) for (int i = 0; i < this.rfids.Count; i+) if (ObjCardInfo.IsHas(this.rfidsi) ObjCardInfo oci = newObjCardInfo(this.rfidsi);if (oci.IsOverTime() SetMenJin("PicInOutTime"); MenJinInit();return; else SetMenJin("PicIn"); MenJinInit();return; SetMenJin("PicInNoCard"); MenJinInit(); elseif (this.directionFlag = 2) for (int i = 0; i < this.rfids.Count; i+) if (ObookInfo.IsHas(this.rfidsi) ObookInfo obi = newObookInfo(this.rfidsi);if (obi.LendStatus = "为借出?") this.rdr.WarningOutput(false, false, true, false, false); SetMenJin("PicOut"); MenJinInit();return; MenJinInit(); /<summary>/门禁初始化/</summary>privatevoid MenJinInit() this.rfids.Clear();this.directionFlag = 0;this.timer1.Tag = "0"this.timer1.Stop(); privatevoid SetMenJin(string message) this.fiao.Controls.Clear();UserControlMenJin ucmj = newUserControlMenJin(message); ucmj.Dock = DockStyle.Fill;this.fiao.Controls.Add(ucmj); privatevoid FormMain_FormClosing(object sender, FormClosingEventArgs e) /this.rfid.StopInventory();/this.rfid.CloseSerial(); 图书统计using System;using System.Collections.Generic;using System.ponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace LabrarypublicpartialclassFormBookStatistics : Form privateint boolShelf;public FormBookStatistics() Initializeponent(); BindTreeView();this.boolShelf = 0; BindListView("select RFID,BookType_ID,Name,Author,LendStatus,BookShelf from BookInfo");this.cboBookLendStatus.SelectedIndex = 0; privatevoid BindTreeView() this.treeView1.Nodes.Clear();TreeNode nodeRoot = newTreeNode(); nodeRoot.Text = "全部书架¹"this.treeView1.Nodes.Add(nodeRoot);for (int i = 0; i < 4; i+) TreeNode nodeChild = newTreeNode();if (i = 0) nodeChild.Text = "第一书架¹" if (i = 1) nodeChild.Text = "第二书架¨¹" if (i = 2) nodeChild.Text = "第三书架¨¹" if (i = 3) nodeChild.Text = "第四书架¨¹" nodeRoot.Nodes.Add(nodeChild); nodeRoot.Expand(); privatevoid BindListView(string sql)

    注意事项

    本文(RFID图书管理系统程序源代码.doc)为本站会员(知****量)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开