CmsWeb/Admin/settings/category_edit.aspx.cs
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Cms.Common;
public partial class Admin_settings_category_edit : System.Web.UI.Page
{
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"];
}
DropList_Bind();//绑定栏目========================================
int id = Convert.ToInt32(this.Request.QueryString["id"] ?? "0");//文章类别ID=====================
string parent_id = this.Request.QueryString["parent_id"] ?? "";//上级类别ID=======================
int channel_id = Convert.ToInt32(this.Request.QueryString["channel_id"] == "" ? "0" : this.Request.QueryString["channel_id"]);//栏目ID===
string action = this.Request.QueryString["action"] ?? "";//编辑:edit 添加:add========================
switch (action)
{
case "add":
this.TreeBind(channel_id);//绑定类别===========================================
ddlParentId.SelectedValue = id.ToString();//设置默认上级类别===============================
ddlchannel_id.SelectedValue = channel_id.ToString();//设置栏目===============================
break;
case "edit":
this.TreeBind(channel_id);//绑定类别==================================
this.ShowInfo(id);//绑定栏目信息===========================================
ddlParentId.SelectedValue = parent_id;//设置默认上级类别===================================
ddlchannel_id.SelectedValue = channel_id.ToString();//设置栏目=================================
break;
}
}
}
#region 绑定栏目===================================
public void DropList_Bind()
{
ddlchannel_id.Items.Clear();
//ddlchannel_id.Items.Add(new ListItem("颜色分类", "0"));
Cms.BLL.C_type bllcolumn = new Cms.BLL.C_type();
后面还有 286 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
