protected void ddlEventos_SelectedIndexChanged(object sender, EventArgs e)
    {
        btnExportar.Enabled = false;
        if (ddlEventos.SelectedValue != "0")
        {
            SqlDSgeneral.SelectCommand = "SELECT * FROM [" + ddlEventos.SelectedValue + "]";

            SqlDSgeneral.DataBind();
            btnExportar.Enabled = true;
        }
    }
 protected void btnConsultar_Click(object sender, EventArgs e)
 {
     SqlDSgeneral.SelectCommand = "SELECT * FROM [" + lblEventoId.Text + "]";
     SqlDSgeneral.DataBind();
 }
Ejemplo n.º 3
0
    protected void ddlEventos_SelectedIndexChanged(object sender, EventArgs e)
    {
        switch (ddlEventos.SelectedValue)
        {
        case "cultivos2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [cultivos2014]";
            break;

        case "administradores2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [administradores2014]";
            break;

        case "desertfishes2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [desertfishes2014]";
            break;

        case "ott2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [ott2014]";
            break;

        case "ogmforo2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [ogmforo2014]";
            break;

        case "expociencias2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [expociencias2014]";
            break;

        case "posgrado2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [posgrado2014]";
            break;

        case "filogeografia2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [filogeografia2014]";
            break;

        case "cari2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [cari2014]";
            break;

        case "cpi2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [CPI2013]";
            break;

        case "cpi2013mpd":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [CPI2013mpd]";
            break;

        case "secuencias2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Secuencias2013]";
            break;

        case "pace2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Pace2013]";
            break;

        case "smcs-congreso2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [smcs2013]";
            break;

        case "pesquerias2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Pesquerias2013]";
            break;

        case "microalgas2014":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [microalgas2014]";
            break;

        case "statistical2013":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Statistical2013]";
            break;

        case "microscopia2012":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Microscopia2012]";
            break;

        case "registroWeb":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [RegistroWeb]";
            break;

        case "oxidativestress2012":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Oxidativestress2012]";
            break;

        case "consultivo":
            SqlDSgeneral.SelectCommand = "SELECT * FROM [Consultivo]";
            break;

        default:
            break;
        }
        SqlDSgeneral.DataBind();
        btnExportar.Enabled = true;
    }