CmsWeb/Admin/message/adedit.aspx.cs

(开头部分) 5KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Cms.Common;
using System.Data;

public partial class Admin_message_adedit : System.Web.UI.Page
{
    Cms.BLL.C_ad bllad = new Cms.BLL.C_ad();
    Cms.Model.C_ad Modelad = new Cms.Model.C_ad();
    Cms.BLL.C_adtype blladtype = new Cms.BLL.C_adtype();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //登录验证
            adminUser.GetLoginState();

            //登录信息
            HttpCookie cookie = System.Web.HttpContext.Current.Request.Cookies["admin"];

            if (cookie != null)
            {
                Application["adminname"] = (string)cookie.Values["adminname"];
            }
            else if (Session["adminname"] != null)
            {
                Application["adminname"] = (string)Session["adminname"];
            }

            int id = Convert.ToInt32(this.Request.QueryString["id"] ?? "0");//信息ID
            string strparentId = this.Request.QueryString["parentId"] ?? "";//上级栏目ID

            bindadtype();//绑定广告分类

            string action = this.Request.QueryString["action"] ?? "";//编辑:edit 添加:add
            switch (action)
            {
                case "add":
                    break;
                case "edit":
                    this.DataBind(id);//绑定文章信息
                    break;
            }
        }
    }

    #region 绑定广告分类=========================
    public void bindadtype()
    {
       
        DataSet ds = blladtype.GetList("");
        if (ds != null && ds.Tables[0].Rows.Count > 0)
        {
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                ListItem item = new ListItem();
后面还有 111 行代码,购买后查看完整代码

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

AI 解读 AI

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

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