2020年新版C#编写图书管理系统.docxVIP

  • 14
  • 1
  • 约5.73万字
  • 约 62页
  • 2020-09-09 发布于天津
  • 举报
精选范本 精选范本 usex = dr[ usex ].ToString(); usex = dr[ usex ].ToString(); 精选范本 精选范本 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() lnitializeComponent(); private void loginbtn_Click( object sender, EventArgs e) { if ( this .useracctxt.Text.Trim() == this .pswtxt.Text == ) { MessageBoxShow(”请输入您的用户名和密码! ,提示! ”); return ; } try { string sql; and upsw=sql = select * from tb_user where uacc= + this .useracctxt.Text + and upsw= + this .pswtxt.Text + ; OleDbDataReader dr = DBHelpOleReader(sql); dr.Read(); if (dr.HasRows) { uacc =upsw = uname = dr[ uacc = upsw = uname = dr[ this .pswtxt.Text; uname].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 { MessageBoxShow(”账号或密码错误!,提示! ”); this .useracctxt.Clear(); this .pswtxt.Clear(); this .useracctxt.Focus(); } } catch ( Exception ) { MessageBoxShow(”数据库无法连接!,警告!); } } 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() { lnitializeComponent(); } private void RightSet_Load( object sender, EventArgs e) { this .rightbox.Selectedlndex = 0; 〃this.treeright.ExpandAII(); Fill(); 精选范本 精选范本 精选范本 精选范本 private void okbtn_Click( object sender, EventArgs e) { if ( this .txtnum.Text == string .Empty) { MessageBoxShow(”请输入最大借阅图书数量! ,”提示! ”); return ; } if ( this .txtday.Text == string .Empty) { MessageBoxShow(”请输入最大借阅图书时间! ,”提示! ”); return ; } if ( this .txtcost.Text == string .Empty) { MessageBoxShow(”请输入借书押金金额! ,提示! ”); return ; } if ( this .txtfine.Text == string .Empty)

文档评论(0)

1亿VIP精品文档

相关文档