1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace iNethinkCMS.Web.admin.extend
- {
- public partial class KHZL : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- Bind();
- if (!string.IsNullOrEmpty(Request.QueryString["Delete"]))
- {
- BLL.BLL_Immediateuse bll = new BLL.BLL_Immediateuse();
- string id = Request.QueryString["Delete"];
- id = id.Substring(0, id.Length - 1);
- if (bll.DeleteList(id))
- {
- ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>alert('删除成功');window.location.replace('KHZL.aspx')</script>");
- }
- else
- {
- ClientScript.RegisterStartupScript(this.GetType(), "tishi", "<script type='text/javascript'>alert('删除成功');</script>");
- }
- }
- }
- }
- void Bind()
- {
- BLL.BLL_Immediateuse bll = new BLL.BLL_Immediateuse();
- DataTable dt = bll.GetList("1=1").Tables[0];
- PagedDataSource pds = new PagedDataSource();
- AspNetPager1.RecordCount = dt.Rows.Count;
- pds = new PagedDataSource();
- pds.AllowPaging = true;
- pds.PageSize = AspNetPager1.PageSize;
- pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
- pds.DataSource = dt.DefaultView;
- rptList.DataSource = pds;
- rptList.DataBind();
- }
- protected void AspNetPager1_PageChanged(object sender, EventArgs e)
- {
- // Bind();
- }
- }
- }
|