本人是一个初学者,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
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