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

图书管理系统(内附源代码)VIP专享VIP免费

图书管理系统(内附源代码)_第1页
图书管理系统(内附源代码)_第2页
图书管理系统(内附源代码)_第3页
本人是一个初学者,2 个月前学习C #,学习过程中遇到过许多困难无法独立解决,现在做成了第一个系统:图书管理系统,各项功能均能顺利实现,因为知道很多初学者和我一样苦无求学之道,现在将部分主要源码上传,希望能得到高手的指点。 下面就是该系统的主要功能及代码: 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 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 upsw='" + this.pswtxt.Text + "'"; OleDbDataReader dr = DBHelp.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 = 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("数据库无法连接!", "警告!"); } } private void cancelbtn_Click(object sender, EventArgs e) { Application.Exit(); } 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.Se...

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

碎片内容

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