Ejemplo n.º 1
0
    protected void cmdDel_Click(object sender, EventArgs e)
    {
        string result = string.Empty;

        for (int i = 0; i <= grd.Rows.Count - 1; i++)
        {
            CheckBox cbx = (CheckBox)grd.Rows[i].FindControl("cbx");
            if (cbx.Checked == true)
            {
                result = EqpManage.Delete(grd.Rows[i].Cells[1].Text);
                if (result != "success")
                {
                    JScript.Alert("删除设备!", this);
                }
            }
        }
        if (result == "success")
        {
            JScript.Alert("设备已成功删除!", this);
            databind();
        }
    }