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; } }