private void DeleteData(int nBookChapterUpdateID) { BookUpdateBLL BookChapterUpdateBLL = new BookUpdateBLL(); ItemBLL objItemBll = new ItemBLL(); objItemBll.DeleteItemByChapterID(nBookChapterUpdateID, ""); BookChapterUpdateBLL.DeleteBookUpdate(nBookChapterUpdateID); BindGrid(); }
protected void btnDelAll_Click(object sender, EventArgs e) { try { ItemBLL objbll = new ItemBLL(); if (HfChapterId.Value != "-1") { objbll.DeleteItemByChapterID(Convert.ToInt32(HfChapterId.Value), txtChapterName.Text); } else { objbll.DeleteItemByBookID(Convert.ToInt32(HfBookId.Value), txtChapterName.Text); } SessionSet.PageMessage = "删除成功!"; } catch (Exception) { SessionSet.PageMessage = "删除失败!"; return; } }