欢迎来到天天文库
浏览记录
ID:45559615
大小:499.85 KB
页数:63页
时间:2019-11-14
《-【优秀文档资料】c#图书管理系统源代码文档(打印版)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、这里是我的毕业设计,用C#编写一一学校图卩馆竹理系统。全部仿真测试过,毕业论文获得优秀,分享给人家。1.背陆界面主要代码:publicpartialclassLoginForm:Form(publicstaticstringuacc;publicstaticstringupsw;publicstaticstringuncime;publicstaticstringusex;publicstaticstringupart;publicstaticstringuright;publicLoginEormO{InitializeComponent();}privatevoid
2、loginbtn.Click(objectsender,EventArgsc){if(this・useracctxt.Text・Trim()==&&this・pswtxt.Text=="“){MessageBox.Show(”请输入您的用户名和密码!“,"提示!“);return;}try{andupsw二'"stringsql;sql=,zsclcct*fromtb^uscrwhereuacc二'”+this・uscracclxl・Text+this・pswtxt.Text+・feipinl00.com";OleDbDataReaderdr=DBIlelp.OleRe
3、ader(sql);dr.Read();if(dr.HasRows)uacc=this・useracctxt.Text;upsw=this,pswtxt.Text;uname二dr["unanie"]・ToStringO;usex=dr[z,usex,z]・ToStringO;upart=dr[,,upart,/]・ToString();uright=dr[/zuright,z]・ToString();MciinEormaf二newMciinEorm(this);this.Hide();this・userscctxt・Clear();tzhis.pswtxt.Clear
4、();af.Show();}else{MessageBox.ShowC账号或密码错误!","提示!”);this・useracctxl・Clear();this・pswtxt・Clear();this・useracctxt・Eocus();}}catch(Exception){Mess鸥eBox.Show(“数据库无法连接!〃,“警告!“);}}privatevoidcancelbtn_Click(objectsender,EventArgse){Applicalion・Exit();}privatevoidLoginFormClosing(objectsonderTF
5、omiClosingEvontArgse){Application.Exit();1}2•主界面(图较小,自己可以拉大点)主要代码就不写了,很简单。3.权限设置主要代码:publicpartitilclassKightSet:Form{publicRightSet(){Initia1izcComponcnt();}privatevoidRightSetLoad(objectsondertEventArgse){this・rightbox・Solcctcdlndcx=0;//this・treeright・ExptindAll();I'illO;}privatevoidok
6、btn^Click(objectsender,EvcntArgsc){if(this・txtnum・Text==string・Empty){MessageBox.Show(“请输入绘人借阅图书数量!”,"提示!");return;}if(this・txtday.Text==string・Empty){MessageBox.Show(”请输入最大借阅图书时间!“,"提示!“);return;}if(this・txtcost.Text==string.Empty)MessageBox.Show(zzift输入借书押金金额!:〃提示!〃);return;}if(this,tx
7、tfine.Text==string.Empty){MessageBox.Show("请输入超期罚款金额!〃,“提示!“);return;}if(this.txttim.Text==string.Empty){MessageBox.Show("请输入图书遗失罚款倍数!“,〃提示!“);return;}Array!.istarr=newArrayList():forcach(TrccNodcnodesinthis,trccright.Nodes){if(nodes.Checked){arr.Add(T);}else{arr.Add("0")
此文档下载收益归作者所有