Ejemplo n.º 1
0
        public void sqlTrans()
        {
            QuerySql sql = new QuerySql(this.connectionConfig_0, null, this.httpRequest_0, this.httpSessionState_0);

            for (int i = 0; i < this.xmlDocument_0.DocumentElement.ChildNodes.Count; i++)
            {
                XmlNode node  = this.xmlDocument_0.DocumentElement.ChildNodes.Item(i);
                XmlNode node4 = node.ChildNodes.Item(node.ChildNodes.Count - 1).ChildNodes.Item(0).SelectSingleNode("import");
                if (node4 != null)
                {
                    XmlNode node3 = node4.SelectSingleNode("fields");
                    if (node3 != null)
                    {
                        int[]    numArray = new int[node3.ChildNodes.Count];
                        object[] objArray = new object[node3.ChildNodes.Count];
                        int      index    = 0;
                        index = 0;
                        while (index < node3.ChildNodes.Count)
                        {
                            string strsql = node3.ChildNodes.Item(index).ChildNodes.Item(1).InnerText;
                            if ((strsql != null) && (strsql.Length != 0))
                            {
                                numArray[index] = Convert.ToInt32(node3.ChildNodes.Item(index).ChildNodes.Item(0).InnerText);
                                objArray[index] = sql.sqlToHashtable(strsql);
                            }
                            index++;
                        }
                        for (index = 0; index < (node.ChildNodes.Count - 1); index++)
                        {
                            if (objArray[index] != null)
                            {
                                XmlNode   node2     = node.ChildNodes.Item(index);
                                string    str       = node2.ChildNodes.Item(numArray[index]).InnerText;
                                Hashtable hashtable = (Hashtable)objArray[index];
                                if (((str != null) && (str.Length > 0)) && hashtable.ContainsKey(str.Trim()))
                                {
                                    str = (string)hashtable[str.Trim()];
                                    node2.ChildNodes.Item(numArray[index]).InnerText = (str);
                                }
                            }
                        }
                    }
                }
            }
        }