CmsWeb/html/content.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 System.Data;
using System.Data.SqlClient;
using Cms.DBUtility;

public partial class html_content : System.Web.UI.Page
{
    public DataSet ds;
    public SqlDataAdapter dr;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int id = Convert.ToInt32(this.Request.QueryString["articleId"] ?? "0");//ID
           
            if (new Cms.BLL.C_article().Exists(id))
            {
                Cms.Model.C_article model = new Cms.BLL.C_article().GetModel(id);
                if (model != null)
                {
                    Application["newTitle"] = model.title;
                    Application["newContent"] = model.content;

                    Application["newIntro"] = model.intro;
                    
                    if (new Cms.BLL.C_Column().Exists(Convert.ToInt32(model.parentId)))
                    {
                        Cms.Model.C_Column modelC_Column = new Cms.BLL.C_Column().GetModel(Convert.ToInt32(model.parentId));
                        if (modelC_Column != null)
                        {
                            Application["className"] = modelC_Column.className;
                            Application["content"] = modelC_Column.content;
                            Application["engName"] = modelC_Column.engName;
                            Application["intro"] = modelC_Column.intro;
                            Application["sub_title"] = modelC_Column.sub_title;
                        }


                    }
                }


            }
            else
            {
                Response.Redirect("/index.aspx");
            }
        }

        DataSet ds = new Cms.BLL.C_Column().GetList("parentId=26 order by classId");
        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            RepeaterClumn.DataSource = ds.Tables[0].DefaultView;
            RepeaterClumn.DataBind();
后面还有 16 行代码,购买后查看完整代码

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

AI 解读

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

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