//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { // ChkAdminLevel("manager_list", MXEnums.ActionEnum.Delete.ToString()); //检查权限 int sucCount = 0; int errorCount = 0; for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { if (gbll.Delete(id)) { sucCount += 1; } else { errorCount += 1; } } } AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "信息" + sucCount + "条,失败" + errorCount + "条"); //记录日志 JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("vote_list.aspx", "typeid={0}&keywords={1}", ddlProperty.SelectedValue, this.txtKeywords.Text), "Success"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int id = Convert.ToInt32(Request.Params["id"]); int wid = Convert.ToInt32(Request.Params["wid"]); string txtKeywords = ""; BLL.wx_vote_base gbll = new BLL.wx_vote_base(); gbll.Delete(id, wid); BLL.wx_vote_item itembll = new BLL.wx_vote_item(); itembll.Delete(id); AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除投票,id为" + id); //记录日志 JscriptMsg("删除成功!", Utils.CombUrlTxt("vote_list.aspx", "keywords={0}", txtKeywords), "Success"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int id = Convert.ToInt32( Request.Params["id"]); int wid = Convert.ToInt32(Request.Params["wid"]); string txtKeywords = ""; BLL.wx_vote_base gbll = new BLL.wx_vote_base(); gbll.Delete(id, wid); BLL.wx_vote_item itembll = new BLL.wx_vote_item(); itembll.Delete(id); AddAdminLog(MXEnums.ActionEnum.Delete.ToString(), "删除投票,id为" + id); //记录日志 JscriptMsg("删除成功!", Utils.CombUrlTxt("vote_list.aspx", "keywords={0}", txtKeywords), "Success"); } }