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

📄 mo_style_manage.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 Shop.Web.UI;

namespace YXShop.Web.Admin.Templates
{
    public partial class Mo_Style_Manage : System.Web.UI.Page
    {
        BasePage bp = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!PowerTree.PowerPass.isPass("010004000", PowerTree.PowerPanel.PowerType.look))
            {
                bp = new BasePage();
                bp.PageError("对不起,你没有查看该页面的权限!", "../index.aspx");
            }
            if (!IsPostBack)
            {
                if ((!string.IsNullOrEmpty(Request["Css_ID"])) && (!string.IsNullOrEmpty(Request["cssName"])) && Request["action"] == "del")
                {
                    if (!PowerTree.PowerPass.isPass("010004003", PowerTree.PowerPanel.PowerType.del))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有删除风格样式的权限!", "../index.aspx");
                    }
                    else
                    {
                        DelAction(Request["Css_ID"], Request["cssName"]);
                    }
                }

                BindData();
            }
        }
        public void DelAction(string _id,string _cssName)
        {
            try
            {
                YXShop.DBUtility.SqlHelper.ExecuteNonQuery(YXShop.DBUtility.SqlHelper.ConnectionStringLocalTransactionHr, CommandType.Text, "delete from YX_Css where Css_ID="+int.Parse(_id)+"", null);
                YXShop.DBUtility.fileHelper fileObj = new YXShop.DBUtility.fileHelper();
                fileObj.Delete(Server.MapPath("~/skins/"+_cssName+".css"));
            }
            catch { }
        }
        public void BindData()
        {
            try
            {
                string sqlText = "select * from YX_Css";
                Css_List.DataSource = YXShop.DBUtility.SqlHelper.ExecuteDataSet(YXShop.DBUtility.SqlHelper.ConnectionStringLocalTransactionHr, CommandType.Text, sqlText, null);
                Css_List.DataBind();

            }
            catch { }
        }
        public string ShowTP(string _id)
        {
            string str = "";
            if (!string.IsNullOrEmpty(_id))
            {
                try
                {
                    str = (string)YXShop.DBUtility.SqlHelper.ExecuteScalar(YXShop.DBUtility.SqlHelper.ConnectionStringLocalTransactionHr, CommandType.Text, "select TP_Name from YX_TemplateProgramme where TP_ID=" + int.Parse(_id) + "", null);
                }
                catch { }
            }
            return str;
        }
    }
}

⌨️ 快捷键说明

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