protected void Proyectos()
    {
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        dtResultado = obj.USP_SEL_TBL_VALORIZACION_CC("ALQUILER VALORIZACION", Session["IDE_USUARIO"].ToString());
        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);
    }
示例#2
0
    protected void Proyectos()
    {
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        //dtResultado = obj.USP_SEL_TBL_VALORIZACION_CC_CONSOLIDADO("ALQUILER VALORIZACION", Session["IDE_USUARIO"].ToString(), Convert.ToInt32(ddlanio.SelectedValue), Convert.ToInt32(ddlMes.SelectedValue));
        dtResultado = obj.USP_SEL_TBL_VALORIZACION_CC("ALQUILER VALORIZACION", Session["IDE_USUARIO"].ToString());

        if (dtResultado.Rows.Count > 0)
        {
            //Panel1.Visible = true;
            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 ---", ""));
            }
            rpt_cuadro();
        }
        else
        {
            //Panel1.Visible = false;
        }
        ScriptManager.RegisterStartupScript(this, typeof(Page), "myScript", "gridviewScroll();", true);
    }
    protected void ConsultarPermisos()
    {
        BL_TBL_RequerimientoSubDetalle obj = new BL_TBL_RequerimientoSubDetalle();
        DataTable dtResultado = new DataTable();

        dtResultado = obj.USP_SEL_TBL_VALORIZACION_CC("ALQUILER VALORIZACION", Session["IDE_USUARIO"].ToString());
        if (dtResultado.Rows.Count > 0)
        {
            btnBuscar.Visible = true;

            btnGuardar.Visible   = true;
            btnCerrar.Visible    = true;
            btnValorizar.Visible = true;
            btnTarifas.Visible   = true;
            btnImprimir.Visible  = true;
        }
        else
        {
            btnImprimir.Visible  = false;
            btnValorizar.Visible = false;
            btnTarifas.Visible   = false;
            btnBuscar.Visible    = false;

            btnGuardar.Visible = false;
            btnCerrar.Visible  = false;

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