/// <summary> /// 查询出投资信息绑定方法 /// </summary> private void GetInfoNews() { string strCriteria = ViewState["Criteria"].ToString(); long CurrentPage = Convert.ToInt64(this.AspNetPager.CurrentPageIndex); long PageNum = Convert.ToInt64(this.AspNetPager.PageSize); long TotalCount = 0; long PageCount = 1; Tz888.BLL.offer.CapitalInfoManage srvSI = new Tz888.BLL.offer.CapitalInfoManage(); DataSet ds = srvSI.dsGetNewsList("*", strCriteria, "publishT desc", CurrentPage, PageNum, out TotalCount); this.AspNetPager.RecordCount = Convert.ToInt32(TotalCount); this.NewsList.DataSource = ds.Tables[0].DefaultView; this.NewsList.DataBind(); if (TotalCount % PageNum > 0) { PageCount = TotalCount / PageNum + 1; } else { PageCount = TotalCount / PageNum; } }
protected void Button1_Click(object sender, EventArgs e) { string[] values = Request.Form.GetValues("cbxSelect"); Tz888.BLL.offer.CapitalInfoManage bllobj = new Tz888.BLL.offer.CapitalInfoManage(); StringBuilder sb = new StringBuilder(); foreach (string str in values) { bool b = Dcommon.bBuyInfoOfUserName(Convert.ToString(str.ToString().Trim())); if (b != true) { string name = casesInfo.PaperExeists(Convert.ToInt32(str.ToString().Trim())); if (name != "") { string[] html = name.Split('/'); string[] cc = html[2].Split('.'); com.DeleteFile(@TZStatic + html[1].ToString() + @"\" + html[2].ToString()); } else { sb.Append("编号:" + str.ToString().Trim() + ",删除失败\\n"); } long info = bllobj.delete(str.Trim()); if (info > 0) { Tz888.Common.MessageBox.Show(this.Page, "删除成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "删除失败"); } this.GetInfoNews(); } else { Tz888.Common.MessageBox.Show(this.Page, "该信息已有用户购买,不能删除"); } } }