⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brand_list.aspx.cs

📁 易想商城系统
💻 CS
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;
using Shop.Web.UI;

namespace YXShop.Web.Admin.Product
{
    public partial class Pro_Brand_List : System.Web.UI.Page
    {
        public string allNodes = "";
        YXShop.BLL.Pro_Brand Prob = new YXShop.BLL.Pro_Brand();
        BasePage bp = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(YXShop.Web.Admin.Product.Pro_Brand_List));
            if (!PowerTree.PowerPass.isPass("001002000", PowerTree.PowerPanel.PowerType.look))
            {
                bp = new BasePage();
                bp.PageError("对不起,你没有查看此页的权限!", "../index.aspx");
            }
            else
            {
                allNodes = this.getAllNodes();
            }
        }
        #region(模块管理)
        public string getAllNodes()
        {
            String result = "";
            
            List<YXShop.Model.Pro_Brand> data = Prob.GetAll();
            for (int i = 0; i < data.Count; i++)
            {
                String menuId = data[i].Brand_ID.ToString();
                String fatherId = data[i].Brand_CategoriesID.ToString();
                String name = data[i].Brand_Name.ToString();
                result = result + menuId + "," + name + "," + fatherId + ";";

            }
            return result;
        }
      #endregion

        #region (删除节点)
        [AjaxPro.AjaxMethod]
        public string BrandDel(string StrID)
        {
            if (!PowerTree.PowerPass.isPass("001002003",PowerTree.PowerPanel.PowerType.del))
            {
                return "对不起,你没有删除品牌的权限!";
            }
            string rtstr = string.Empty;
            YXShop.Model.Pro_Brand ProBM = new YXShop.Model.Pro_Brand();
            int CID = Convert.ToInt32(StrID.Substring(0, StrID.IndexOf("_", 0)));
            int ID = Convert.ToInt32(StrID.Substring(StrID.IndexOf("_", 0) + 1, StrID.Length - StrID.IndexOf("_", 0) - 1));
            
            List<YXShop.Model.Pro_Brand> data = Prob.GetListByColumn("Brand_CategoriesID", ID);
            if (data.Count > 0)
            {
                rtstr = "删除出错\n\n不能删除根模块!";
            }
            else
            {
                ProBM.Brand_ID = ID;
                Prob.Delect(ProBM);
            }
            return rtstr;
        }
        #endregion

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -