- 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)
您可能关注的文档
- 《控制工程基础》第二版课后习题答案.docx
- PAC期间平均成本模板.docx
- PROJECT项目管理报告.docx
- Tiptop成本结算-操作手册-最新版本.docx
- 安全监理规划最新.docx
- 安全文明施工提升方案-最新版.docx
- 安全隐患整改通知书回复单总符照片.docx
- 保险公司业务操作流程实务(车险).docx
- 操作手册-PP-040-生产版本主数据.docx
- 厨房设备标准.docx
- (正式版)DB51∕T 1867-2014 《袋栽黑木耳生产技术规程》.docx
- (正式版)DB51∕T 2413-2023 《油橄榄密植丰产栽培技术规程》.docx
- (正式版)DB51∕T 2436-2017 《川菜东坡一品肉烹饪工艺技术规范》.docx
- (正式版)DB51∕T 2396-2017 《农村电子商务服务站(点)服务与管理规范》.docx
- (正式版)DB51∕T 2419-2017 《桢楠扦插育苗技术规程》.docx
- CN105145773B 一种无花果曲奇饼干及其制作方法 (江苏农林职业技术学院).docx
- CN105203825A 微测量电极的制作方法和热电势的测量方法及相关装置 (国家纳米科学中心).docx
- CN105137533B 一种啁啾光纤光栅及其制作方法 (南京航空航天大学).docx
- (正式版)DB51∕T 2453-2018 《巴山新居公共管理指南》.docx
- (正式版)DB51∕T 1892-2014 《川西北地区沙化土地治理技术规程》.docx
原创力文档

文档评论(0)