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

📄 css.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.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using YXShop.BLL;
using YXShop.Common;
using System.Collections.Generic;
using Shop.Web.UI;
namespace YXShop.Web.Admin.ShopThemes
{
    public partial class Css : System.Web.UI.Page
    {
        YXShop_ShopCss B_ShopCss = new YXShop_ShopCss();
        protected PageSet ps;
        BasePage bp = null;
        Model.YXShop_ShopCss M_ShopCss = new YXShop.Model.YXShop_ShopCss();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!PowerTree.PowerPass.isPass("015003000", PowerTree.PowerPanel.PowerType.look))
            {
                bp = new BasePage();
                bp.PageError("对不起,你没有查看此页面的权限!", "../index.aspx");
            }
            if (!IsPostBack)
            {
                BindData();
            }
        }


        void BindData()
        {
            int pageIndex = Request["pageIndex"] == null ? 0 : int.Parse(Request["pageIndex"]);
            if (pageIndex < 0)
            {
                pageIndex = 0;
            }
            if ((Request["Event"] == null) || (Request["Event"] == ""))
            {
                pageIndex = 0;
            }
            string condition = null;
            if (!string.IsNullOrEmpty(Request.QueryString["TID"]))
            {
                condition += " TID=" + Request.QueryString["TID"];
            }
            DataSet ds = DBUtility.Pagination.Pages("YXShop_ShopCss", "SCID", "*", PageSet.PageSize, pageIndex, "SCID", condition);
            ps = new YXShop.Common.PageSet(DBUtility.Pagination.GetPageCount("SCID", "YXShop_ShopCss", condition), PageSet.PageSize, pageIndex);
            rptShopCss.DataSource = ds;
            rptShopCss.DataBind();
        }

        protected void lbtOperation(object s, EventArgs e)
        {
            string dataType = ((LinkButton)s).CommandName;
            string ID = ((LinkButton)s).CommandArgument;

            switch (dataType)
            {
                case "Use":
                    if (!PowerTree.PowerPass.isPass("015003007", PowerTree.PowerPanel.PowerType.other))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有修改店铺样式状态的权限!", "../index.aspx");
                    }
                    else
                    {
                        if (B_ShopCss.Amend(Convert.ToInt32(ID.Split(',')[0]), "SCState", ID.Split(',')[1] == "1" ? 0 : 1) > 0)
                        {
                            alert.showOnly("修改使用状态成功");
                        }
                        else
                        { alert.showOnly("修改使用状态失败"); }
                    }
                    break;
                case "Del":
                    if (!PowerTree.PowerPass.isPass("015003003", PowerTree.PowerPanel.PowerType.del))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有删除店铺样式的权限!", "../index.aspx");
                    }
                    else
                    {
                        M_ShopCss.SCID = Convert.ToInt32(ID);
                        if (B_ShopCss.Delect(M_ShopCss) > 0)
                        {
                            alert.showOnly("删除成功");
                        }
                        else { alert.showOnly("删除失败"); }
                    }
                        break;
            }
            BindData();
        }
        protected string GetTName(int TID)
        {
            if (Cache["Themes"] == null)
            {
                List<Model.YXShop_ShopThemes> cacheThemes = new BLL.YXShop_ShopThemes().GetListByColumn();
                Cache["Themes"] = cacheThemes;
            }
            List<Model.YXShop_ShopThemes> listThemes = (List<Model.YXShop_ShopThemes>)Cache["Themes"];
            if (listThemes.Count > 0)
            {
                for (int i = 0; i < listThemes.Count; i++)
                {
                    if (TID == listThemes[i].TID)
                    {
                        return listThemes[i].TName;
                    }
                }
            }
            return "";
        }
    }
}

⌨️ 快捷键说明

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