AdimiFile/ManagerLogin.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

public partial class UI_Forms_Manager_Forms_ManagerLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Label1.Text = DAL.DataAccess.Secondpasswords(Label1);
        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        if (TextBox3.Text.ToLower() == Label1.Text.ToLower())
        {
            string strsql1 = string.Format("Select count(*) from users Where UserName='{0}' and Passwords='{1}' and Role='管理员'", TextBox1.Text, TextBox2.Text);
            DataTable dt = DAL.DataAccess.Execute(strsql1);
            if (dt.Rows[0][0].ToString() == "1")
            {
                Session["ManagerName"] = TextBox1.Text;
                Response.Redirect("~/AdimiFile/UserManager.aspx");

            }
            else
                Page.ClientScript.RegisterStartupScript(this.GetType(), "s", "alert(\"   信息有误,登录失败!\")", true);
            Label1.Text = DAL.DataAccess.Secondpasswords(Label1);

        }
        else
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "s", "alert(\"   验证码输入有误!\")", true);
            Label1.Text = DAL.DataAccess.Secondpasswords(Label1);
        }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Label1.Text = DAL.DataAccess.Secondpasswords(Label1);
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。