Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (EispNewsBLL.GetRecordCountByLang(lang) > 0)
         {
             AspNetPager1.RecordCount = EispNewsBLL.GetRecordCountByLang(lang);
             BindNews(AspNetPager1.RecordCount, AspNetPager1.PageSize);
         }
     }
 }
Exemplo n.º 2
0
 // 删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     foreach (GridViewRow row in GridView1.Rows)
     {
         if (((CheckBox)row.FindControl("chk")).Checked)
         {
             int id = int.Parse(((Label)row.FindControl("id")).Text);
             // this.News_Delete(id);
             EispNewsBLL.DeleteNewByID(id);
         }
     }
     if (EispNewsBLL.GetRecordCountByLang(lang) > 0)
     {
         AspNetPager1.RecordCount = EispNewsBLL.GetRecordCountByLang(lang);
         BindNews(AspNetPager1.RecordCount, AspNetPager1.PageSize);
     }
     else
     {
         this.GridView1.Visible = false;
     }
 }