123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using CB.Framework;
- using CB.Entity;
- using CB.Data;
- using CB.Common;
- namespace CB.Admin
- {
- public partial class TrendToolList : AdminPage
- {
- protected int PageID = 0;
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- { BindRepeaterList(); }
- }
- protected override void BindRepeaterList()
- {
- PageID = WRequest.GetInt("Id", 0);
- IList<TrendToolInfo> lists = new List<TrendToolInfo>();
- if (PageID != 0)
- {
- lists = TrendToolService.ToList(new TrendToolInfo() { PageID = PageID, ParentID = -1 });
- }
- //lists = Caches.GetTrendToolList(new TrendToolInfo() { PageID = PageID, ParentID = -1 });
- repeaterList.DataSource = lists;
- repeaterList.DataBind();
- }
- protected void btnSearch_Click(object sender, EventArgs e)
- {
- BindRepeaterList();
- }
- protected void repeaterList_ItemCommand(object source, RepeaterCommandEventArgs e)
- {
- switch (e.CommandName)
- {
- case "dndel":
- {
- int id = TypeConverter.ObjectToInt(e.CommandArgument, 0);
- TrendToolService.Delete(id);
- BindRepeaterList();
- }
- break;
- }
- }
- protected void AspNetPager1_PageChanged(object sender, EventArgs e)
- {
- }
- }
- }
|