您的位置:首页 > Web前端 > JavaScript

使用JavaScript全选后的删除方法

2011-07-14 21:50 471 查看
myArrayList1 = new ArrayList();
for (int i = 0; i < GridView1.Rows.Count; i++)
{
    CheckBox myCheckBox = GridView1.Rows[i].Cells[0].FindControl("gvChkBox") as CheckBox;
    if (myCheckBox != null && myCheckBox.Checked == true)
    {
        myArrayList1.Add("DELETE from TABLE where TiaoJian=" + GridView1.Rows[i].Cells[1].Text.ToString());
        int Fhz = 0;
        if (types == "1")
        {
            Fhz = myBusinessOperation.bGetInt(myArrayList1);
        }
        else
        {
            Fhz = myBusinessOperation.Oracle_GetInt(myArrayList1);
        }
        if (Fhz > 0)
        {
            Page.ClientScript.RegisterStartupScript(this.GetType(), "alert1", "<script>alert('删除成功!');</script>
4000
;");
        }
    }
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  javascript delete types null