Song.Site/Manage/Student/Safe.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 WeiSha.Common;
using Song.ServiceInterfaces;

namespace Song.Site.Manage.Student
{
    public partial class Safe : Extend.CustomPage
    {
        private int id = WeiSha.Common.Request.QueryString["id"].Int32 ?? 0;
        //private string _uppath = "Student";
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Form.DefaultButton = this.btnEnter.UniqueID;
            if (!IsPostBack)
            {
                fill();
            }
        }

        private void fill()
        {
            Song.Entities.Student th = id == 0 ? Extend.LoginState.Student.CurrentUser : Business.Do<IStudent>().StudentSingle(id);
            if (th == null) return;
            this.EntityBind(th);
            
        }
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEnter_Click(object sender, EventArgs e)
        {
            Song.Entities.Student obj = Extend.LoginState.Student.CurrentUser;
            try
            {
                string pw = this.tbOldPw.Text.Trim();
                obj = Business.Do<IStudent>().StudentSingle(obj.St_AccName, pw, obj.Org_ID);
                this.lbShow.Visible = obj == null;
                if (obj == null) return;
                //员工登录密码,为空
                if (tbPw1.Text != "")
                {
                    string md5 = WeiSha.Common.Request.Controls[tbPw1].MD5;
                    obj.St_Pw = md5;
                }
                Business.Do<IStudent>().StudentSave(obj);
                this.Alert("操作成功!");
            }
            catch (Exception ex)
            {
                Message.ExceptionShow(ex);
            } 
            
        }
后面还有 14 行代码,解锁后查看完整代码

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

AI 解读

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

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