Web/login.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Maticsoft.Common;

namespace Maticsoft.Web
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string aname = Request.Form["username"];
            string pwd = Request.Form["password"];
            string role = this.DropDownList1.SelectedValue;
            //string aname ="admin";
            //string pwd ="1";

            Model.users ma = new BLL.users().GetModel(aname, pwd, role);
            if (ma != null)
            {
                Session["uid"] = ma.uid;
                Session["name"] = ma.uname;
                Session["power"] = ma.roles;
                Session["xyid"] = ma.xyid;
                Response.Redirect("index.html");
            }
            else
            {
                MessageBox.Show(this, "用户名或密码错误,请重新输入!");
            }
        }
    }
}

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

AI 解读 AI

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

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