Exemplo n.º 1
0
 //批量删除
 protected void btnDel_Click(object sender, EventArgs e)
 {
     B_User bll = new B_User();
     for (int i = 0; i <= Egv.Rows.Count - 1; i++)
     {
         CheckBox cbox = (CheckBox)Egv.Rows[i].FindControl("chkSel");
         if (cbox.Checked == true)
         {
             btnDel.Attributes.Add("OnClientClick", "return confirm('你确定要删除吗?');");
             bll.DelUserById(DataConverter.CLng(Egv.DataKeys[i].Value));
         }
     }
     Bind();
 }
Exemplo n.º 2
0
 protected void Lnk_Click(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "ChgPsw")
             Page.Response.Redirect("UserPassModify.aspx?UserID=" + e.CommandArgument.ToString());
         if (e.CommandName == "Del")
         {
             B_User bll = new B_User();
             string Id = e.CommandArgument.ToString();
             bll.DelUserById(DataConverter.CLng(Id));
             Bind();
         }
 }
Exemplo n.º 3
0
 //删除会员
 protected void delete_Click(object sender, EventArgs e)
 {
     B_User bll = new B_User();
     for (int i = 0; i <= Egv.Rows.Count - 1; i++)
     {
         CheckBox cbox = (CheckBox)Egv.Rows[i].FindControl("chkSel");
         if (cbox.Checked)
         {
             bll.DelUserById(DataConverter.CLng(Egv.DataKeys[i].Value));
         }
     }
     Bind();
 }