NewsRelease.UI/Login.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NewsRelease.Model;
using NewsRelease.BLL;

namespace NewsRelease.UI
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // 下载于www.51aspx.com
        }
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            Admin a = new Admin();
            a.UserName = txtUserName.Text;
            a.UserPass = txtPass.Text;
            if (AdminBLL.Only(a))
            {
                Response.Write("<script>alert('账号已存在,请直接登陆(程序开小差了...)');</script>");
            }
            else
            {
                if (AdminBLL.Add(a))
                {

                    Response.Write("<script>alert('注册成功请登录。');</script>");


                }
            }
        }

        protected void btnEnter_Click(object sender, EventArgs e)
        {
            
            Admin a = new Admin();
            a.UserName = txtUserName.Text;
            a.UserPass = txtPass.Text;

            if (AdminBLL.CheckLogin(a))
            {
                Response.Write("<script>alert('登陆成功!');history.back();</script>");
            }
            else
            {

                Response.Write("<script>alert('登录失败');history.back();</script>");
            }
        }

        protected void btnDelete_Click(object sender, EventArgs e)
        {
            Admin a = new Admin();
            a.UserName = txtUserName.Text;
后面还有 35 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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