Web/BBS/Admin/BigClassModify.aspx.cs

(完整代码) 1KB

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;
using DotBBS.Business;
using DotBBS.Common;
using DotBBS.Model;

//============================================================================
// 官方支持:DotBBS.Net   作者:吸铁石团队(水煮鱼)
//============================================================================
public partial class Admin_BigClassModify : DotAdminPage
{
    BigClassBll bll = new BigClassBll();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            MyInit();
        }
    }

    private void MyInit()
    {
        int BigClassID = int.Parse(Request.QueryString["BigClassID"].ToString());
        txtBigClassName.Text = bll.GetModel(BigClassID).BigClassName;
        txtBigClassPos.Text = bll.GetModel(BigClassID).BigClassPos.ToString();
        txtInfo.Text = bll.GetModel(BigClassID).Info;
        cbIsShow.Checked = bll.GetModel(BigClassID).IsShow;
        lblBigClassID.Text = BigClassID.ToString();
    }

    protected void btnModify_Click(object sender, EventArgs e)
    {
        BigClass bc = new BigClass();
        bc.BigClassID = int.Parse(lblBigClassID.Text);
        bc.BigClassName = txtBigClassName.Text.Trim();
        bc.BigClassPos = int.Parse(txtBigClassPos.Text.Trim());
        bc.Info = txtInfo.Text.Trim();
        bc.IsShow = cbIsShow.Checked;
        bll.Update(bc);
        JsUtil.ShowMsg("修改成功!", "?BigClassID=" + int.Parse(lblBigClassID.Text));
    }
}

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

AI 解读 AI

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

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