CmsWeb/Admin/settings/model_list.aspx.cs

(开头部分) 9KB

这里只显示每个文件的开头 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;
using Cms.Common;

public partial class Admin_settings_model_list : System.Web.UI.Page
{
    protected int channel_id;
    protected int id;
    protected string channel_name = string.Empty; //频道名称

    protected void Page_Load(object sender, EventArgs e)
    {
        this.channel_id = Convert.ToInt32(this.Request.QueryString["channel_id"] ?? "1");//栏目ID
        this.channel_name = ""; //取得频道名称
        if (this.channel_id == 0)
        {
            JscriptMsg("频道参数不正确!", "back", "Error");
            return;
        }
        if (!Page.IsPostBack)
        {
            //ChkAdminLevel("channel_" + this.channel_name + "_category", DTEnums.ActionEnum.View.ToString()); //检查权限
            id = Convert.ToInt32(this.Request.QueryString["id"] ?? "0");//类别ID
            RptBind(id);
        }
    }

    #region 数据绑定==================================
    private void RptBind(int id)
    {
        
        DataTable dt =new Cms.BLL.C_model().GetList("").Tables[0];
        this.rptList.DataSource = dt;
        this.rptList.DataBind();

        Cms.BLL.C_Column cm = new Cms.BLL.C_Column();
        string classname = cm.GetModel(27).className;
        bool bladd = adminUser.setpurview(classname, "add");
        bool blEdit = adminUser.setpurview(classname, "Edit");
        bool blDelete = adminUser.setpurview(classname, "Delete");

        if (!bladd)
        {
            btnadd.Visible = false;
        }
        if (!blEdit)
        {
            btnSave.Visible = false;
        }
        if (!blDelete)
        {
            btnDelete.Visible = false;
        }
后面还有 192 行代码,购买后查看完整代码

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

AI 解读

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

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