?? wangjimima.aspx.cs
字號(hào):
?using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class wangjimima : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.Label3.Text = "";
this.Label4.Text = "";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Server=.;Database=物流公司貨運(yùn)管理;uid=sa;pwd=;");
con.Open();
SqlCommand cmd = new SqlCommand("select count(*) from 用戶表 where 用戶編號(hào) ='" + TextBox1.Text + "'", con);
int count = Convert.ToInt32(cmd.ExecuteScalar());
if (count > 0)
{
this.Panel1.Visible = false;
this.Panel2.Visible = true;
this.Label3.Text = this.TextBox1.Text;
}
else
{
this.Label1.Text = "用戶名不正確!!!";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Server=.;Database=物流公司貨運(yùn)管理;uid=sa;pwd=;");
con.Open();
SqlCommand cmd = new SqlCommand("select count(*) from 用戶表 where 安全問(wèn)題提示 ='" + TextBox2.Text + "'", con);
int count = Convert.ToInt32(cmd.ExecuteScalar());
if (count > 0)
{
this.Panel2.Visible = false;
this.Panel3.Visible = true;
this.Label3.Text = this.TextBox1.Text;
}
else
{
this.Label1.Text = "您的密碼提示問(wèn)題不正確!!!";
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -