<a onclick=this.style.behavior='url(#default#homepage)';this.setHomePage('http://你的域名/');return(false); href=javascript://>设为首页</a>
网页代码问题:会员注册与播放器代码
登录页面代码:
static void Main()
{
Application.Run(new Login());
}
private void btAdd_Click(object sender, System.EventArgs e)
{
if(name.Text.Trim()==||password.Text.Trim()==)
MessageBox.Show(请输入用户名和密码,提示);
else
{
oleConnection1.Open();
OleDbCommand cmd=new OleDbCommand(,oleConnection1);
string sql=select * from userinfo where UName='+name.Text.Trim()+' and PWD='+password.Text.Trim()+';
cmd.CommandText=sql;
if (null!=cmd.ExecuteScalar())
{
//隐藏登录窗口
this.Visible=false;
//创建并打开主界面
Main main=new Main();
main.Tag=this.FindForm();
OleDbDataReader dr;
cmd.CommandText=sql;
dr=cmd.ExecuteReader();
dr.Read();
main.statusBarPanel2.Text=name.Text.Trim();
main.ShowDialog();
}
else
MessageBox.Show(用户名或密码错误,警告);
}
oleConnection1.Close();
}
private void btClose_Click(object sender, System.EventArgs e)
{
this.Close();
- 上一篇: 条形码存在什么问题?
- 下一篇: 返回列表