//效率较低
        public void DumpIntoDB(string path, string systemName, string subSystem, string tunnelName,
                               string tableName, string columnName, bool isPositiveDir, bool isWaterReturnPipe)
        {
            if (string.IsNullOrEmpty(path))
            {
                return;
            }
            m_sqlite = new MtSQLite(path);

            string[] _columnKey   = columnName.Split(';'); //id,upstream,downstream
            string[] _columnValue = new string[10];

            foreach (var Node in m_allTreeNodeList)
            {
                string info = Node.Info;

                _columnValue[0] = ResetPipeId(Node, systemName, Node.Id.ToString());   //ID

                if (string.IsNullOrEmpty(tunnelName))
                {
                    _columnValue[3] = "'" + "Default" + "'"; //TUNNEL 默认为Default
                }
                else
                {
                    _columnValue[3] = "'" + tunnelName + "'";
                }

                _columnValue[5] = Node.IsValve.ToString();                               //IsValve : 0 :非Valve  1: 是Valve
                _columnValue[6] = "'" + subSystem + "'";                                 //SUBSYSTEM : 通过下拉框选择
                _columnValue[7] = "'" + GetSubsystemCode(subSystem) + "'";               //subsystemCode
                _columnValue[8] = "'" + (IsEncodeDevice(info) ? 1 : 0).ToString() + "'"; //设备是否有编码
                _columnValue[9] = "'" + "0" + "'";                                       //是否是末端管道
                if (isPositiveDir)
                {
                    _columnValue[4] = "1"; //DIRECTION 1:正向 0:逆向

                    if (Node.Parent == null)
                    {
                        _columnValue[1] = "'" + string.Empty + "'";

                        foreach (var child in Node.ChildNodes)
                        {
                            _columnValue[2] = ResetPipeId(child, systemName, child.Id.ToString()); //DOWNSTREAM
                            m_sqlite.InsertInto(tableName, _columnKey, _columnValue);
                        }
                    }
                    else
                    {
                        _columnValue[1] = ResetPipeId(Node.Parent, systemName, Node.Parent.Id.ToString());  //UPSTREAM
                        if (Node.ChildNodes != null && Node.ChildNodes.Count != 0)
                        {
                            foreach (var child in Node.ChildNodes)
                            {
                                _columnValue[2] = ResetPipeId(child, systemName, child.Id.ToString()); //DOWNSTREAM
                                m_sqlite.InsertInto(tableName, _columnKey, _columnValue);
                            }
                        }
                        else
                        {
                            _columnValue[2] = "'" + string.Empty + "'";
                            _columnValue[9] = "'" + "1" + "'";                        //是否是末端管道 1:是 0:不是
                            m_sqlite.InsertInto(tableName, _columnKey, _columnValue); //加入没有下游的记录
                        }
                    }
                }
                else
                {
                    _columnValue[4] = "0"; //DIRECTION 1:正向 0:逆向

                    if (Node.Parent == null)
                    {
                        _columnValue[2] = "'" + string.Empty + "'";

                        foreach (var child in Node.ChildNodes)
                        {
                            _columnValue[1] = ResetPipeId(child, systemName, child.Id.ToString()); //加入逆向的初始管道
                            m_sqlite.InsertInto(tableName, _columnKey, _columnValue);
                        }
                    }
                    else
                    {
                        _columnValue[2] = ResetPipeId(Node.Parent, systemName, Node.Parent.Id.ToString());  //DOWNSTREAM

                        if (Node.ChildNodes != null && Node.ChildNodes.Count != 0)
                        {
                            foreach (var child in Node.ChildNodes)
                            {
                                _columnValue[1] = ResetPipeId(child, systemName, child.Id.ToString()); //UPSTREAM
                                m_sqlite.InsertInto(tableName, _columnKey, _columnValue);
                            }
                        }
                        else
                        {
                            if (!isWaterReturnPipe) //回水的末端不加入数据库中,因为供水的管道已经写入
                            {
                                _columnValue[1] = "'" + string.Empty + "'";
                                _columnValue[9] = "'" + "1" + "'";
                                m_sqlite.InsertInto(tableName, _columnKey, _columnValue); //加入没有上游的记录
                            }
                        }
                    }
                }
            }
            m_isHide = true;
        }