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

📄 showtemplates.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Accessories
{
    using PowerEasy.Common;
    using PowerEasy.Components;
    using PowerEasy.Web.UI;
    using System;
    using System.Data;
    using System.IO;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class ShowTemplates : AdminPage
    {
        protected string FilePath;
        protected HtmlForm form1;
        protected HiddenField HdnFileText;
        protected int i;
        protected string ParentDir;
        protected Repeater RepFiles;

        protected void BindData(string dir)
        {
            this.RepFiles.DataSource = FileSystemObject.GetDirectoryInfos(base.Request.PhysicalApplicationPath + dir, FsoMethod.All);
            this.RepFiles.DataBind();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                string templateDir = SiteConfig.SiteOption.TemplateDir;
                string str2 = base.Request.QueryString["FilesDir"];
                string str3 = "";
                if (!string.IsNullOrEmpty(str2))
                {
                    str3 = str2.Replace("/", @"\");
                }
                string str4 = "";
                if (!string.IsNullOrEmpty(templateDir))
                {
                    str4 = templateDir.Replace("/", @"\");
                }
                this.HdnFileText.Value = str2;
                DirectoryInfo info = new DirectoryInfo(base.Request.PhysicalApplicationPath + str4 + str3);
                if (info.Exists)
                {
                    this.BindData(str4 + str3);
                }
            }
        }

        protected void RepFiles_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                DataRowView dataItem = (DataRowView) e.Item.DataItem;
                if ((dataItem["name"].ToString() == "标签库") || (dataItem["name"].ToString() == "分页标签库"))
                {
                    e.Item.Visible = false;
                }
            }
        }
    }
}

⌨️ 快捷键说明

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