c#图书管理系统源代码文档.pdf
《c#图书管理系统源代码文档.pdf》由会员分享,可在线阅读,更多相关《c#图书管理系统源代码文档.pdf(10页珍藏版)》请在三一文库上搜索。
1、精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - 这里是我的毕业设计,用c#编写学校图书馆管理系统。全部仿真测试过,毕业论文获 得优秀,分享给大家。 1.登陆界面 主要代码: publicpartialclassLoginForm : Form publicstaticstring uacc; publicstaticstring upsw; publicstaticstring uname; publicstaticstring usex; publicstaticstring upart; publicstaticstr
2、ing uright; public LoginForm() InitializeComponent(); privatevoid loginbtn_Click(object sender, EventArgs e) if ( this .useracctxt.Text.Trim() = “ return ; try string sql; sql = “select * from tb_user where uacc=“+ this .useracctxt.Text + “ and upsw=“ + this .pswtxt.Text + ““; OleDbDataReader dr = D
3、BHelp .OleReader(sql); dr.Read(); if (dr.HasRows) 精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - uacc = this .useracctxt.Text; upsw = this .pswtxt.Text; uname = dr“uname“.ToString(); usex = dr“usex“ .ToString(); upart = dr“upart“.ToString(); uright = dr“uright“.ToString(); MainForm af =
4、 new MainForm( 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( “数据库无法连接!“, “警告! “ ); privatevoid cancelbtn_Cli
5、ck(object sender, EventArgs e) Application.Exit(); privatevoid LoginForm_Closing(object sender, FormClosingEventArgs e) Application.Exit(); 2. 主界面(图较小,自己可以拉大点) 精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - 主要代码就不写了,很简单。 3. 权限设置 主要代码: publicpartialclassRightSet : Form public RightSet()
6、InitializeComponent(); privatevoid RightSet_Load(object sender, EventArgs e) this .rightbox.SelectedIndex = 0; /this.treeright.ExpandAll(); Fill(); privatevoid okbtn_Click(object sender, EventArgs e) if ( this .txtnum.Text = string.Empty) 精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - M
7、essageBox .Show( “请输入最大借阅图书数量!“, “提示! “ ); return ; if ( this .txtday.Text = string.Empty) MessageBox .Show( “请输入最大借阅图书时间!“, “提示! “ ); return ; if ( this .txtcost.Text = string .Empty) MessageBox .Show( “请输入借书押金金额!“, “提示! “ ); return ; if ( this .txtfine.Text = string .Empty) MessageBox .Show( “请输入超
8、期罚款金额!“, “提示! “ ); return ; if ( this .txttim.Text = string.Empty) MessageBox .Show( “请输入图书遗失罚款倍数!“, “提示! “ ); return ; ArrayList arr = new ArrayList(); foreach ( TreeNode nodes inthis .treeright.Nodes) if (nodes.Checked) arr.Add(“1“ ); else arr.Add(“0“ ); foreach ( TreeNode node in nodes.Nodes) if
9、(node.Checked) arr.Add(“1“ ); 精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - else arr.Add(“0“ ); string a=new string11; for ( int i = 0; i arr.Count; i+) if (arri.ToString().Trim() = “1“ ) ai = “yes“ ; else ai = “no“ ; string sql = string.Empty; sql += “select * from tb_right where urig
10、ht=“ + this .rightbox.Text + “ ; DataTable dt = DBHelp.ExeOleCommand(sql); bool b = false ; while (dt.Rows.Count != 0) b = true ; break ; string sql1; if (b) sql1 = “update tb_right set “; sql1 += “maxbook=“ + this .txtnum.Text + “,“; sql1 += “maxdate=“ + this .txtday.Text + “,“; sql1 += “rcost=“ +
11、this .txtcost.Text + “,“; sql1 += “rfine=“ + this .txtfine.Text + “,“; sql1 += “rtim=“ + this .txttim.Text + “,“; 精品文档就在这里 - 各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有- - - -精品文档 - sql1 += “rbm=“ + a0 + “,“; sql1 += “rum=“ + a1 + “,“; sql1 += “rrm=“ + a2 + “,“; sql1 += “rborm=“ + a3 + “,“; sql1 += “ris=“ +
12、 a4 + “,“; sql1 += “rbis=“ + a5 + “,“; sql1 += “ruis=“ + a6 + “,“; sql1 += “rboris=“ + a7 + “,“; sql1 += “rblp=“ + a8 + “,“; sql1 += “rbl=“ + a9 + “,“; sql1 += “rlp=“ + a10 + “ “; sql1 += “where uright=“ + this .rightbox.Text + “ ; else sql1 = “insert into tb_right(uright,maxbook,maxdate,rcost,rfine
13、,rtim,rbm,rum,rrm,rborm,ris,rbis,ruis,rboris,rblp ,rbl,rlp)“; sql1 += “ values(“ + this .rightbox.Text + “,“ + this .txtnum.Text + “,“ + this .txtday.Text + “,“ + this .txtcost.Text + “,“ + this .txtfine.Text + “,“ + this .txttim.Text + “,“ + a0 + “,“ + a1 + “,“ + a2 + “,“ + a3 + “,“ + a4 + “,“ + a5
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- c# 图书 管理 系统 源代码 文档
链接地址:https://www.31doc.com/p-4717194.html