Admin/Manage/PwAdd.aspx.cs

(开头部分) 3KB

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

using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Models;
using System.Linq;


    public partial class PwAdd : AdminBase
    {
        private int _Id=0;
        private int _isOne = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.CacheControl = "no-cache";
            if (!string.IsNullOrEmpty(Request.Params["ID"]))
            {
                _Id = int.Parse(HttpContext.Current.Request.QueryString["ID"]);
                _isOne = 1;
            }
            else
            {
                _Id = int.Parse(Session["AdminID"].ToString());
            }
            if (!Page.IsPostBack)
            {

                if (_isOne != 0)
                {
                    this.Panel1.Visible = false;
                    Entities mydb = new Entities();
                    {
                        Manages _lt = mydb.Manages.First(p => p.MID == _Id);
                        this.Literal1.Text = "用户:"+_lt.MName;
                    }
                }
                 

            }        
        }

        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
             Entities mydb = new Entities();
                  {
                   Manages Lt = new Manages();
                   if (_Id != 0) 
                   {
                       Lt = mydb.Manages.First(p => p.MID == _Id);
                       if (txtNew.Text.Trim().Equals("") || txtNew2.Text.Trim().Equals(""))
                       {
                           JscriptPrint("密码不能为空!", "", "Error");
                           return;
                       }
                       if (txtNew.Text.Trim() != txtNew2.Text.Trim())
                       {
                           JscriptPrint("两次密码不一致!", "", "Error");
                           return;
后面还有 56 行代码,解锁后查看完整代码

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

AI 解读

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

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