protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { DownloadsBind(EispDownloadsBLL.GetRecordCountByLang(lang), 20); } }
protected void Page_Load(object sender, EventArgs e) { if (VerifyTool.IsInt(Request.QueryString["page"])) { CurrentPage = Convert.ToInt32(Request.QueryString["page"]); //要减去的记录数 int subtract_number = 20 * (CurrentPage - 1); //要获取的记录数:记录总数-要减去的记录数 int number = EispDownloadsBLL.GetRecordCountByLang(lang) - subtract_number; if (EispDownloadsBLL.GetRecordCountByLang(lang) > 0) { BindDownloads(number, 20, EispDownloadsBLL.GetRecordCountByLang(lang)); } } else { if (EispDownloadsBLL.GetRecordCountByLang(lang) > 0) { BindDownloads(EispDownloadsBLL.GetRecordCountByLang(lang), 20, EispDownloadsBLL.GetRecordCountByLang(lang)); } } //Page.Title = " 公司简介"; Page.Title = "资料下载"; }
protected void btnDelete_Click(object sender, EventArgs e) { foreach (GridViewRow row in this.GridView1.Rows) { if (((CheckBox)row.FindControl("chk")).Checked) { int id = Convert.ToInt32(((Label)row.FindControl("id")).Text); EispDownloadsBLL.Delete(id); } } Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", "alert('删除成功')", true); DownloadsBind(EispDownloadsBLL.GetRecordCountByLang(lang), 20); }