示例#1
0
    protected void Eliminar_onClick(object sender, EventArgs e)
    {
        int      id_orden;
        CheckBox chb;
        string   query = "";
        Orden    o     = new Orden();

        for (int i = 0; i < GVOrdenes.Rows.Count; i++)
        {
            chb = (CheckBox)GVOrdenes.Rows[i].FindControl("ChBEliminar");
            if (chb.Checked)
            {
                id_orden = int.Parse(((LinkButton)GVOrdenes.Rows[i].FindControl("LBNoOrden")).CommandName);
                o.Delete(id_orden);
            }
        }
        if (Request.QueryString["id_usuario"] != null)
        {
            query = "?id_usuario=" + Request.QueryString["id_usuario"];
        }
        Response.Redirect("Visor_Ordenes.aspx" + query);
    }