[计算机软件及应用]图书管理系统_c语言源代码

上传人:新** 文档编号:439052910 上传时间:2023-02-20 格式:DOC 页数:59 大小:466.50KB
返回 下载 相关 举报
[计算机软件及应用]图书管理系统_c语言源代码_第1页
第1页 / 共59页
[计算机软件及应用]图书管理系统_c语言源代码_第2页
第2页 / 共59页
[计算机软件及应用]图书管理系统_c语言源代码_第3页
第3页 / 共59页
[计算机软件及应用]图书管理系统_c语言源代码_第4页
第4页 / 共59页
[计算机软件及应用]图书管理系统_c语言源代码_第5页
第5页 / 共59页
点击查看更多>>
资源描述

《[计算机软件及应用]图书管理系统_c语言源代码》由会员分享,可在线阅读,更多相关《[计算机软件及应用]图书管理系统_c语言源代码(59页珍藏版)》请在金锄头文库上搜索。

1、一个图书馆的管理系统,用c#做的,visual studio2021编写的。代码经测试全部实现,暂时未发现什么bug,在年纪的评比中得到了第一名的成绩。下面把这些代码分享给你们,希望能对你们有所帮助。1.登陆界面主要代码:public partial class LoginForm : Form public static string uacc; public static string upsw; public static string uname; public static string usex; public static string upart; public static

2、string uright; public LoginForm() InitializeComponent(); private void loginbtn_Click(object sender, EventArgs e) if (this.useracctxt.Text.Trim() = & this.pswtxt.Text = ) MessageBox.Show(请输入您的用户名和密码!, 提示!); return; try string sql; sql = select * from tb_user where uacc= + this.useracctxt.Text + and u

3、psw= + this.pswtxt.Text + om; OleDbDataReader dr = DBHelp.OleReader(sql); dr.Read(); if (dr.HasRows) uacc = this.useracctxt.Text; upsw = this.pswtxt.Text; uname = druname.ToString(); usex = drusex.ToString(); upart = drupart.ToString(); uright = druright.ToString(); MainForm af = new MainForm(this);

4、 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(数据库无法连接!, 警告!); private void cancelbtn_Click(object sender, EventArgs e) Application.Ex

5、it(); private void LoginForm_Closing(object sender, FormClosingEventArgs e) Application.Exit(); 2.主界面图较小,自己可以拉大点主要代码就不写了,很简单。3.权限设置主要代码:public partial class RightSet : Form public RightSet() InitializeComponent(); private void RightSet_Load(object sender, EventArgs e) this.rightbox.SelectedIndex = 0

6、; /this.treeright.ExpandAll(); Fill(); private void okbtn_Click(object sender, EventArgs e) if (this.txtnum.Text = string.Empty) MessageBox.Show(请输入最大借阅图书数量!, 提示!); return; if (this.txtday.Text = string.Empty) MessageBox.Show(请输入最大借阅图书时间!, 提示!); return; if (this.txtcost.Text = string.Empty) MessageB

7、ox.Show(请输入借书押金金额!, 提示!); return; if (this.txtfine.Text = string.Empty) MessageBox.Show(请输入超期罚款金额!, 提示!); return; if (this.txttim.Text = string.Empty) MessageBox.Show(请输入图书遗失罚款倍数!, 提示!); return; ArrayList arr = new ArrayList(); foreach (TreeNode nodes in this.treeright.Nodes) if (nodes.Checked) arr.

8、Add(1); else arr.Add(0); foreach(TreeNode node in nodes.Nodes) if (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 uright= + 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 ;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 商业计划书

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号