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

📄 affiche.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.Web.Admin.Control;
using System.Collections.Generic;
using Shop.Web.UI;

namespace YXShop.Web.Admin.Shop
{
    public partial class Affiche : System.Web.UI.Page
    {
        YXShop.BLL.YXShop_Shop sBll = new YXShop.BLL.YXShop_Shop();
        BasePage bp = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!PowerTree.PowerPass.isPass("014005000", PowerTree.PowerPanel.PowerType.look))
            {
                bp = new BasePage();
                bp.PageError("对不起,你没有查看此页面的权限!", "../index.aspx");
            }
            this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_OnPageChange);
            if (!Page.IsPostBack)
            {
                //if (!string.IsNullOrEmpty(Request.QueryString["page"]))
                //{
                //    StartLoad(Convert.ToInt32(Request.QueryString["page"]));
                //    PageNavigator1.PageIndex = Convert.ToInt32(Request.QueryString["page"]);
                //}
                StartLoad(1);

            }
        }

        void PageNavigator1_OnPageChange(object send, int nPageIndex)
        {
            StartLoad(nPageIndex);
        }
        protected void StartLoad(int PageIndex)
        {
            int i = 0;
            int j = 0;
            List<YXShop.Model.YXShop_Shop> data = sBll.GetListByColumn("State", 0, PageIndex, 20, out i, out j);
            this.PageNavigator1.PageCount = j;
            this.PageNavigator1.PageIndex = PageIndex;
            this.PageNavigator1.RecordCount = i;
            Repeater1.DataSource = data;                              //设置datalist数据源
            Repeater1.DataBind();
        }

        protected void LBT_OnClick(object send, EventArgs e)
        {
            string strType = ((LinkButton)send).CommandName;
            int ID = Convert.ToInt32(((LinkButton)send).CommandArgument);

            switch (strType)
            {
                case "Del":
                    if (!PowerTree.PowerPass.isPass("014004003", PowerTree.PowerPanel.PowerType.del))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有删除公告的权限!", "../index.aspx");
                    }
                    else
                    {
                        sBll.Amend(ID, "Affiche", "");
                    }
                    break;                
            }
            StartLoad(PageNavigator1.PageIndex);
        }

        protected string SubString(object str)
        {
            try
            {
                if (str.ToString().Length > 30)
                {
                    return str.ToString().Substring(30)+"...";
                }
                else return str.ToString();
            }
            catch { return null; }
        }
    }
}

⌨️ 快捷键说明

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