示例#1
0
    protected void Proyectos()
    {
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        dtResultado = obj.USP_SEL_TBL_ARRIENDO_CC("RESPONSABLE ALQUILER", Session["IDE_USUARIO"].ToString(), BL_Session.CENTRO_COSTO);
        if (dtResultado.Rows.Count > 0)
        {
            ddlcentro.DataSource     = dtResultado;
            ddlcentro.DataTextField  = "Proy_Nombre";
            ddlcentro.DataValueField = "Proy_Codigo";
            ddlcentro.DataBind();

            if (dtResultado.Rows.Count > 1)
            {
                ddlcentro.Items.Insert(0, new ListItem("--- TODOS ---", ""));
            }

            //Proveedor();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "myScript", "gridviewScroll();", true);
        }
        else
        {
            string cleanMessage = "No cuenta con permisos";
            ScriptManager.RegisterStartupScript(this, typeof(Page), "invocarfuncion", "doAlert('" + cleanMessage + "');", true);
        }
        ScriptManager.RegisterStartupScript(this, typeof(Page), "myScript", "gridviewScroll();", true);
    }