RFID图书管理系统程序源代码样本Word下载.docx
《RFID图书管理系统程序源代码样本Word下载.docx》由会员分享,可在线阅读,更多相关《RFID图书管理系统程序源代码样本Word下载.docx(59页珍藏版)》请在冰豆网上搜索。
¦
证¡
è
控?
件t
/summary>
returns>
<
/returns>
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))
不存在此顾客!
this.tbID.Text="
;
UserManage.ObjUseruser=newUserManage.ObjUser(this.tbID.Text,All.dbo);
if(user.PWD!
=this.tbPWD.Text)
密码错误!
this.tbPWD.Text="
this.tbPWD.Focus();
else
if(this.tbPWD.Text!
123456"
"
returntrue;
privatevoidgbtnCancel_Click(objectsender,EventArgse)
this.Close();
privatevoidgbtnOK_Click(objectsender,EventArgse)
//如¨
果?
验¨
件t通ª
¡
§
过y
if(ValidControl())
All.userLogin=newUserManage.ObjUser(this.tbID.Text,All.dbo);
All.userLogin=newUserManage.ObjUser(All.dbo);
All.userLogin.ID="
All.userLogin.Name="
管理员"
this.DialogResult=DialogResult.OK;
}
主界面
publicpartialclassFormMain:
publicconstintWM_USER=0x0400;
publicconstintWM_GETBUFFER_LOOP=WM_USER+2;
privateRFID_dll.Readerrdr;
privateRFID_dll.RFIDrfid;
List<
string>
rfids=newList<
();
intdirectionFlag=0;
//1进;
出?
FormInAndOutfiao=newFormInAndOut();
publicFormMain()
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)
Screen>
listScreen=newList<
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.应®
|用®
模¡
式º
this.图ª
书º
this.退ª
办ã
¬
卡¡
this.借¨
阅?
this.门?
禁?
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=="
ToolStripMenuItem.Visible=false;
this.顾客管理¨
this.系统初始化¡
CToolStripMenuItem.Visible=false;
this.读书管理¨
this.退办卡¡
this.借阅ToolStripMenuItem.Visible=false;
this.门禁?
for(inti=0;
i<
All.userLogin.Purview.Count;
i++)
stringpurview=All.userLogin.Purview[i];
if(purview=="
1"
this.图书管理¨
elseif(purview=="
2"
this.办退卡¡
3"
this.借阅?
4"
this.门禁ToolStripMenuItem.Visible=true;
privatevoid顾客管理¨
ToolStripMenuItem_Click(objectsender,EventArgse)
UserManage.FormUserListful=newUserManage.FormUserList(All.conn);
ful.ShowDialog();
privatevoid修改密码?
UserManage.FormUserPwdfup=newUserManage.FormUserPwd(All.conn,All.userLogin);
fup.ShowDialog();
privatevoidtsbtnBookType_Click(objectsender,EventArgse)
FormBookTypeListfbtl=newFormBookTypeList();
fbtl.ShowDialog();
private