电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

图书管理系统源码(C版)VIP免费

图书管理系统源码(C版)_第1页
1/35
图书管理系统源码(C版)_第2页
2/35
图书管理系统源码(C版)_第3页
3/35
登录界面: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace book { public partial class login : Form { public string password; //用来存储密码 public login() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { Application.Exit(); } private bool yanzhengshuru() { password = textBox3.Text; if (Typename.Text.Trim() == "") { MessageBox.Show("请选择登录类型", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Information); Typename.Focus(); return false; } else if (loginid.Text.Trim() == "") { MessageBox.Show("请输入用户名", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Information); loginid.Focus(); return false; } else if (password == "") { MessageBox.Show("请输入密码", "登录提示", MessageBoxButtons.OK, MessageBoxIcon.Information); textBox3.Focus(); return false; } else { return true; } } private void button1_Click(object sender, EventArgs e) { userhelper.adminid= loginid.Text; //用户账号 password = textBox3.Text;//用户密码 if (yanzhengshuru()) { if (Typename.Text.Trim() == "管理员") { string sql = string.Format("Select count(*) from admin where adminId='{0}' and adminpass='{1}'", loginid.Text, password); try { SqlCommand command = new SqlCommand(sql, Dbhelper.connection); Dbhelper.connection.Open(); int count = (int)command.ExecuteScalar(); if (count < 1) { MessageBox.Show("用户或密码不存在!"); //result = false; } else { admin admin = new admin(); admin.Show(); } } catch (Exception ex) { MessageBox.Show("操作数据库出错!"); Console.WriteLine(ex.Message); } finally { Dbhelper.connection.Close(); } } if (Typename.Text.Trim() == "借阅者") { userhelper.readerid =Convert .ToString (loginid.Text); strin...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

图书管理系统源码(C版)

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部