예제 #1
0
 protected void lbtnDel_Click(object sender, EventArgs e)
 {
     Cms.DAL.Admin dal = new DAL.Admin();
     //批量删除
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int      id = Convert.ToInt32(((Label)rptList.Items[i].FindControl("lb_id")).Text);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id");
         if (cb.Checked)
         {
             //删除记录
             dal.Delete(id);
         }
     }
     MessageBox.Show(this, "批量删除成功!");
     RptBind("");
 }
예제 #2
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int UserId)
 {
     return(_dal.Delete(UserId));
 }
예제 #3
0
 public void Delete(Common.AdminDatum dm)
 {
     dl.Delete(dm);
 }
예제 #4
0
 protected void lbtnDel_Click(object sender, EventArgs e)
 {
     Cms.DAL.Admin dal = new DAL.Admin();
     //批量删除
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((Label)rptList.Items[i].FindControl("lb_id")).Text);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id");
         if (cb.Checked)
         {
             //删除记录
             dal.Delete(id);
         }
     }
     MessageBox.Show(this, "批量删除成功!");
     RptBind("");
 }