if(lresultado.Trim() != "CINZA"){ x = x + 1; } Response.Write ( x + "ocorrencia(s)");
to fazendo em aspx .....
<%@ Page Language="C#" %>
q tem de errado ? ?
valeu,
Posted 15/01/2004, 13:35
if(lresultado.Trim() != "CINZA"){ x = x + 1; } Response.Write ( x + "ocorrencia(s)");
Posted 15/01/2004, 14:10
Posted 15/01/2004, 14:17
<%@ Page Language="C#" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="empresa.Dados" %> <%@ import Namespace="empresa.Utilitarios" %> <%@ import Namespace="empresa.Seguranca" %> <%@ import Namespace="System.Xml" %> <script runat="server"> void Page_Load(Object src, EventArgs ea) { Response.Expires =-1; Response.ContentType = "text/xml"; XmlDocument oXml = new XmlDocument(); string sFolder = Request.QueryString["Pasta"]; string sFile = Request.QueryString["Arquivo"]; Configuracao oConfiguracao = new Configuracao(); oXml.Load(oConfiguracao.DiretorioDados + "\\XmlConteudos\\" + sFolder + "\\" + sFile); // ------------- Inicio oXml.DocumentElement.InnerXml = TratarXml(oXml.DocumentElement); string sCaminhoMenu = Request.QueryString["CaminhoMenu"]; if(sCaminhoMenu!= "" && sCaminhoMenu!= null){ XmlNode oNo = ((XmlNode)oXml.DocumentElement); string[] aCaminhoMenu = sCaminhoMenu.Split('_'); for(int i=0; i< aCaminhoMenu.Length; i++){ int nIndice; try{ nIndice = Convert.ToInt32(aCaminhoMenu[i]); }catch{ nIndice = -1; } if(nIndice!=-1){ try{ oNo = oNo.ChildNodes[nIndice]; ((XmlElement)oNo).SetAttribute("SubItem", "0"); }catch{ break; } } } } Response.Write(oXml.InnerXml); Response.End(); } String TratarXml(XmlElement oXml){ int x = 0; for(int i=0; i< oXml.ChildNodes.Count; i++){ string pega = ((XmlElement)oXml.ChildNodes[i]).GetAttribute("cor"); String oresultado; bool bRemovido = false; oresultado = Convert.ToString(Texto.FormatarData(pega)); if(String oresultado.Trim() == "CINZA"){ x = x + 1; Response.Write ( x + "ocorrencia(s)"); } } return oXml.InnerXml; // ------------- Fim // Response.Write(oXml.InnerXml); } </script>
Edição feita por: fernandoop, 15/01/2004, 14:22.
Posted 15/01/2004, 14:28
if(lresultado.Trim() = "CINZA"){ x = x + 1; } Response.Write ( x + "ocorrencia(s)");
Posted 15/01/2004, 14:36
Edição feita por: fernandoop, 15/01/2004, 14:37.
Posted 15/01/2004, 14:45
Posted 15/01/2004, 14:53
Posted 15/01/2004, 15:08
Posted 15/01/2004, 15:18
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)