RFID图书管理系统程序源代码样本.docx
- 文档编号:973560
- 上传时间:2022-10-14
- 格式:DOCX
- 页数:59
- 大小:29.70KB
RFID图书管理系统程序源代码样本.docx
《RFID图书管理系统程序源代码样本.docx》由会员分享,可在线阅读,更多相关《RFID图书管理系统程序源代码样本.docx(59页珍藏版)》请在冰豆网上搜索。
RFID图书管理系统程序源代码样本
登陆界面
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
namespaceLabrary
{
publicpartialclassFormLogin:
Form
{
publicFormLogin()
{
InitializeComponent();
}
///
///验¨¦证¡è控?
件t
///
///
privateboolValidControl()
{
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.ObjUseruser=newUserManage.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;
}
privatevoidgbtnCancel_Click(objectsender,EventArgse)
{
this.Close();
}
privatevoidgbtnOK_Click(objectsender,EventArgse)
{
//如¨?
果?
验¨¦证¡è控?
件t通ª¡§过y
if(ValidControl())
{
if(this.tbID.Text!
="admin")
{
All.userLogin=newUserManage.ObjUser(this.tbID.Text,All.dbo);
}
else
{
All.userLogin=newUserManage.ObjUser(All.dbo);
All.userLogin.ID="admin";
All.userLogin.Name="管理员";
}
this.DialogResult=DialogResult.OK;
this.Close();
}
}
}
}
主界面
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Text;
usingSystem.Windows.Forms;
namespaceLabrary
{
publicpartialclassFormMain:
Form
{
publicconstintWM_USER=0x0400;
publicconstintWM_GETBUFFER_LOOP=WM_USER+2;
privateRFID_dll.Readerrdr;
privateRFID_dll.RFIDrfid;
List
intdirectionFlag=0;//1进;出?
FormInAndOutfiao=newFormInAndOut();
publicFormMain()
{
InitializeComponent();
this.rdr=newRFID_dll.Reader();
//this.rfid=newRFID_dll.RFID(rdr);
}
privatevoidFormMain_Load(objectsender,EventArgse)
{
Init();
}
///
///初始化
///
privatevoidInit()
{
fiao.StartPosition=FormStartPosition.Manual;
//多窗体在不同步间显示
Screen[]screens=Screen.AllScreens;
if(screens.Length==2)
{
List
foreach(ScreenscreeninScreen.AllScreens)
{
if(screen.Primary==false)
{
listScreen.Add(screen);
}
}
fiao.Location=listScreen[0].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);
//}
}
///
///权限设立
///
privatevoidSetPurview()
{
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(inti=0;i { stringpurview=All.userLogin.Purview[i]; 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(objectsender,EventArgse) { UserManage.FormUserListful=newUserManage.FormUserList(All.conn); ful.ShowDialog(); } privatevoid修改密码? ToolStripMenuItem_Click(objectsender,EventArgse) { UserManage.FormUserPwdfup=newUserManage.FormUserPwd(All.conn,All.userLogin); fup.ShowDialog(); } privatevoidtsbtnBookType_Click(objectsender,EventArgse) { FormBookTypeListfbtl=newFormBookTypeList(); fbtl.ShowDialog(); } private
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- RFID 图书 管理 系统 程序 源代码 样本