Beispiel #1
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     //ChkAdminLevel("sys_dept", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.product bll = new BLL.product();
     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 && GetAdminInfo().id != id)
         {
             bll.Delete(id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "keywords={0}", this.keywords), "Success");
 }
Beispiel #2
0
 //删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("pro_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.product bll = new BLL.product();
     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)
         {
             bll.Delete(id);
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "删除产品分类数据"); //记录日志
     JscriptMsg("删除数据成功!", Utils.CombUrlTxt("pro_list.aspx", "", ""));
 }