📄 agentlist.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 + -