Admin/LeaveWord_Edit.aspx.cs

(开头部分) 1KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class LeaveWord_Edit : WebPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.ValidateAdmin();
        if (!this.IsPostBack)
        {
            this.initForm();
        }
    }

    #region 窗体内部函数
    /// <summary>
    /// 初始化页面答疑
    /// </summary>
    private void initForm()
    {
        this.hidLeaveWordID.Value = this.Request.QueryString["LeaveWordID"] + "";
        if (this.hidLeaveWordID.Value != "")
        {
            LeaveWordMgr mgr = new LeaveWordMgr();
            LeaveWord leaveWord = mgr.GetLeaveWord(this.hidLeaveWordID.Value);
            if (leaveWord != null)
            {
                this.txtCaption.Text = leaveWord.Caption;
                this.txtReview.Text = leaveWord.Review;
                this.txtContent.Text = leaveWord.Content;
                this.txtStudentName.Text = leaveWord.C_Student.StudentName;
            }
            else
            {
                this.SendMessage("没有找到该答疑");
                this.btnOK.Enabled = false;
            }
        }
    }
    #endregion

    #region 事件产生的函数
    protected void btnOK_Click(object sender, EventArgs e)
    {
        LeaveWordMgr mgr = new LeaveWordMgr();
        LeaveWord leaveWord = mgr.GetLeaveWord(this.hidLeaveWordID.Value);
        leaveWord.Review = this.txtReview.Text;
        
        mgr.UpdateLeaveWord(leaveWord);
        this.SendMessage("数据发布成功");
        this.ClearTextData(this);
    }
后面还有 2 行代码,购买后查看完整代码

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

AI 解读 AI

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

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