login.aspx.cs
(完整代码) 1KBusing 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;
public partial class login : Web.Pages
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string strJs = "";
for (int i = 0; i < RadioButtonList1.Items.Count; i++)
{
if (RadioButtonList1.Items[i].Selected)
{
strJs = RadioButtonList1.Items[i].Text;
break;
}
}
if (strJs == "管理员")
{
if (Database.GetData("select * from 管理员 where 帐号='" + TextBox1.Text + "' and 密码='" + TextBox2.Text + "'").Rows.Count > 0)
{
Session["User"] = TextBox1.Text;
Response.Redirect("Admin/index.aspx");
}
else
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "js1", "<script>alert('登陆信息错误');</script>");
return;
}
}
else if (strJs == "党员")
{
if (Database.GetData("select * from 党员信息 where 学号='" + TextBox1.Text + "' and 密码='" + TextBox2.Text + "'").Rows.Count > 0)
{
Session["User"] = TextBox1.Text;
Response.Redirect("DY/index.aspx");
}
else
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "js1", "<script>alert('登陆信息错误');</script>");
return;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。