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

📄 agentlist.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Controls
{
    using PowerEasy.Controls;
    using PowerEasy.Shop;
    using PowerEasy.Web.UI;
    using System;
    using System.Web.UI.WebControls;

    public class AgentList : BaseUserControl
    {
        protected Button BtnSearch;
        protected DataList DlstAgent;
        protected Button LbtnDelAgent;
        private string m_Keyword;
        protected AspNetPager Pager;
        protected TextBox TxtKeyWord;

        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            this.m_Keyword = this.TxtKeyWord.Text;
            this.DlstAgentBindData();
        }

        private void DlstAgentBindData()
        {
            this.DlstAgent.DataSource = Agent.GetAgentNameList((this.Pager.CurrentPageIndex - 1) * this.Pager.PageSize, this.Pager.PageSize, this.m_Keyword);
            this.Pager.RecordCount = Agent.GetTotal();
            this.DlstAgent.DataBind();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.Pager.PageSize = 20;
            if (!this.Page.IsPostBack)
            {
                this.DlstAgentBindData();
            }
        }

        protected void Pager_PageChanged(object src, PageChangedEventArgs e)
        {
            this.Pager.CurrentPageIndex = e.NewPageIndex;
            this.DlstAgentBindData();
        }
    }
}

⌨️ 快捷键说明

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