protected void ImageButton1_Click(object sender, EventArgs e)
{
string UserName = Request.Form["Username"].ToString().Trim();
string UserPwd = Request.Form["pwd"].ToString().Trim();
SqlConnection scon = dtcon.getcon();
scon.Open();
SqlCommand cmd = scon.CreateCommand();
cmd.CommandText = getStrSQL(this.DropDownList1.Text);
int count = Convert.ToInt32(cmd.ExecuteScalar());
scon.Close();
if (count > 0)
{
Session["UserName"] = UserName;
Session["UserName1"] = this.DropDownList1.Text;
int rankID = getRankID(this.DropDownList1.Text);
Response.Redirect("Admin/" + transfer(rankID));
}
else
{
MessageBox.Show(this.Page, "请正确输入!");
this.Username.Text = "";
this.pwd.Text = "";
MessageBox.SetFocus(this.Username, this.Page);
return;
}