예제 #1
0
    private void GetArrayCR()
    {
        StringBuilder sbuilder = new StringBuilder();
        int           i        = 0;

        sbuilder.Append(" aCR_js = new Array();\n");

        if (SUPER.Capa_Negocio.Utilidades.EsAdminProduccion())
        {
            CR        objCR = new CR();
            List <CR> lCR   = objCR.ObtenerCatalogo();
            foreach (CR oCR in lCR)
            {
                sbuilder.Append("\taCR_js[" + i.ToString() + "] = new Array(\"" + oCR.bEstado.ToString() + "\",\"" +
                                oCR.nIdCR.ToString() + "\",\"" + oCR.sDesCR.ToString() + "\");\n");
                i++;
            }
            strArrayCR = sbuilder.ToString();
        }
        else
        {
            SqlDataReader dr;

            dr = NODO.ObtenerNodosCalendario((int)Session["UsuarioActual"]);
            while (dr.Read())
            {
                sbuilder.Append("\taCR_js[" + i.ToString() + "] = new Array(\"" + "True" + "\",\"" +
                                dr["t303_idnodo"].ToString() + "\",\"" + dr["t303_denominacion"].ToString() + "\");\n");
                i++;
            }

            strArrayCR = sbuilder.ToString();

            dr.Close();
            dr.Dispose();
        }
    }