欢迎来到天天文库
浏览记录
ID:1119611
大小:466.50 KB
页数:59页
时间:2017-11-07
《c#图书管理系统源代码文档》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、成功信息网www.020chenggong.com这里是我的毕业设计,用c#编写——学校图书馆管理系统。全部仿真测试过,毕业论文获得优秀,分享给大家。1.登陆界面主要代码:publicpartialclassLoginForm:Form{publicstaticstringuacc;publicstaticstringupsw;publicstaticstringuname;publicstaticstringusex;publicstaticstringupart;publicstaticstringuright;publicL
2、oginForm(){InitializeComponent();}privatevoidloginbtn_Click(objectsender,EventArgse){if(this.useracctxt.Text.Trim()==""&&this.pswtxt.Text==""){MessageBox.Show("请输入您的用户名和密码!","提示!");return;}try{stringsql;sql="select*fromtb_userwhereuacc='"+this.useracctxt.Text+"'andups
3、w='"+this.pswtxt.Text+"'www.feipin100.com";OleDbDataReaderdr=DBHelp.OleReader(sql);dr.Read();if(dr.HasRows){uacc=this.useracctxt.Text;upsw=this.pswtxt.Text;成功信息网www.020chenggong.comuname=dr["uname"].ToString();usex=dr["usex"].ToString();upart=dr["upart"].ToString();ur
4、ight=dr["uright"].ToString();MainFormaf=newMainForm(this);this.Hide();this.useracctxt.Clear();this.pswtxt.Clear();af.Show();}else{MessageBox.Show("账号或密码错误!","提示!");this.useracctxt.Clear();this.pswtxt.Clear();this.useracctxt.Focus();}}catch(Exception){MessageBox.Show("
5、数据库无法连接!","警告!");}}privatevoidcancelbtn_Click(objectsender,EventArgse){Application.Exit();}privatevoidLoginForm_Closing(objectsender,FormClosingEventArgse){Application.Exit();}}2.主界面(图较小,自己可以拉大点)主要代码就不写了,很简单。3.权限设置成功信息网www.020chenggong.com主要代码:publicpartialclassRightS
6、et:Form{publicRightSet(){InitializeComponent();}privatevoidRightSet_Load(objectsender,EventArgse){this.rightbox.SelectedIndex=0;//this.treeright.ExpandAll();Fill();}privatevoidokbtn_Click(objectsender,EventArgse){if(this.txtnum.Text==string.Empty){MessageBox.Show("请输入
7、最大借阅图书数量!","提示!");return;}if(this.txtday.Text==string.Empty){MessageBox.Show("请输入最大借阅图书时间!","提示!");return;}if(this.txtcost.Text==string.Empty){成功信息网www.020chenggong.comMessageBox.Show("请输入借书押金金额!","提示!");return;}if(this.txtfine.Text==string.Empty){MessageBox.Show("请输入
8、超期罚款金额!","提示!");return;}if(this.txttim.Text==string.Empty){MessageBox.Show("请输入图书遗失罚款倍数!","提示!");return;}ArrayListarr=newArr
此文档下载收益归作者所有