private string ObtenerValoresAtributosEstadisticos(string sNodo, string sAmbito) { StringBuilder sbuilder = new StringBuilder(); byte bEstado; sbuilder.Append(" aVAES = new Array();\n"); if (sNodo != "") { SqlDataReader dr = VAE.CatalogoByUne(int.Parse(sNodo), sAmbito, null); int i = 0; while (dr.Read()) { if ((bool)dr["t340_estado"]) { bEstado = 1; } else { bEstado = 0; } sbuilder.Append("\taVAES[" + i.ToString() + "] = {bd:\"\", " + "idAE:\"" + dr["t341_idae"].ToString() + "\"," + "idVAE:\"" + dr["t340_idvae"].ToString() + "\"," + "nombre:\"" + Utilidades.escape(dr["t340_valor"].ToString()) + "\"," + "estado:\"" + bEstado.ToString() + "\"," + "orden:\"" + dr["t340_orden"].ToString() + "\"};\n"); i++; } dr.Close(); dr.Dispose(); } strArrayVAE = sbuilder.ToString(); return(strArrayVAE); }
private void ObtenerValoresAtributosEstadisticosCR(string sNodo) { StringBuilder sbuilder = new StringBuilder(); sbuilder.Append("var aVAE_js = new Array();\n"); if (sNodo != "") { SqlDataReader dr = VAE.CatalogoByUne(int.Parse(sNodo), "T"); int i = 0; while (dr.Read()) { sbuilder.Append("\taVAE_js[" + i.ToString() + "] = new Array(\"" + dr["t341_idae"].ToString() + "\",\"" + dr["t340_idvae"].ToString() + "\",\"" + dr["t340_valor"].ToString() + "\");\n"); i++; } dr.Close(); dr.Dispose(); } strArrayVAE = sbuilder.ToString(); }