Beispiel #1
0
 /// <summary>
 /// Установить соединение с сервером
 /// </summary>
 /// <param name="ConnectionString">Строка инициализации</param>
 public override void Connect(string ConnectionString)
 {
     _connectionString = ConnectionString;
     _conn             = new SqlConnection(ConnectionString);
     try
     {
         _conn.Open();
     }
     catch (SqlException ex)
     {
         string msg = GetErrorMessage(ex);
         if (MessagePrinter != null)
         {
             MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1);
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// Обертка для выполнения DbCommand
        /// </summary>
        /// <param name="proc"></param>
        protected override void ExecuteCommand(ExecuteCmdDelegate proc)
        {
            try
            {
                _last_error = 0;
                proc.Invoke();
            }
            catch (SQLiteException e)
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1);
                }

                _last_error = e.ErrorCode;
            }
        }
Beispiel #3
0
 void Observe()
 {
     if (string.IsNullOrWhiteSpace(givenExpression))
     {
         MessagePrinter.Print("Nothing is given to me");
         printExp = false;
     }
     else if (Checker.isEquation(givenExpression))                                           // if the string is an equation. i.e. with an equality symbol
     {
         if (Checker.getOccurance(givenExpression, '=') == 1)                                // if there is a correct formate(1 equality only)
         {
             eUnderstander equation = new eUnderstander(theExpressionList, givenExpression); // send the string to eUnderstander for further processing
             if (equation.isProcessed())                                                     // if the string processes with no error or exception handling.
             {
                 Expression theResult = new Expression(equation.getResult());
                 if (DoesNotAlreadyExist(theResult))                               //checks if the variable name already exists or not.
                 {
                     theExpressionList.Add(theResult);
                     printExp = true;
                 }
                 else
                 {
                     printExp = false;
                 }
             }
         }
         else
         {
             MessagePrinter.Print("Wrong formate equation must contain only one equality operator");
         }
     }
     else
     {
         vUnderstander expression = new vUnderstander(theExpressionList, givenExpression);                     // sends the equation  to the virtual Understanding classes to manage it.
         if (expression.isProcessed())
         {
             Expression theResult = new Expression(expression.getResult());
             theExpressionList.Add(theResult);
             printExp = true;
         }
         else
         {
             printExp = false;
         }
     }
 }
        protected override object ExecuteScalarCommand(ExecuteScalarCmdDelegate proc)
        {
            try
            {
                return(proc.Invoke());
            }
            catch (Npgsql.NpgsqlException e)
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1);
                }

                _last_error = e.ErrorCode;
            }

            return(null);
        }
Beispiel #5
0
        protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc)
        {
            try
            {
                return(proc.Invoke());
            }
            catch (OracleException e)
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1);
                }

                _last_error = e.ErrorCode;
            }

            return(null);
        }
Beispiel #6
0
        /// <summary>
        /// Обертка для выполнения DbCommand.ExecuteReader
        /// </summary>
        /// <param name="proc"></param>
        protected override DbDataReader ExecuteDataReader(ExecuteDataReaderCmdDelegate proc)
        {
            try
            {
                _last_error = 0;
                return(proc.Invoke());
            }
            catch (SqlException e)
            {
                string msg = GetErrorMessage(e);
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1);
                }
            }

            return(null);
        }
Beispiel #7
0
        private void ProcessDetailsPage(ProcessQueueItem pqi)
        {
            if (cancel)
            {
                return;
            }

            var wi   = (ExtWareInfo)pqi.Item;
            var html = PageRetriever.ReadFromServer(pqi.URL);
            var doc  = CreateDoc(html);

            pqi.Processed = true;

            var details = doc.DocumentNode.SelectSingleNode("//div[@class='BlockContent']");

            if (details == null)
            {
                Log.Error(details, new NullReferenceException());
                return;
            }

            var images = details.SelectNodes("//div[@class='ProductTinyImageList']/ul/li/div[@class='TinyOuterDiv']/div/a[@rel]")
                         .Select(s => JsonConvert.DeserializeObject <ImageObject>(s.AttributeOrNull("rel")));
            var item = new ExtWareInfo
            {
                Category    = wi.Category,
                SubCategory = wi.SubCategory,
                Page        = wi.Page,
                Url         = wi.Url,
                Title       = details.SelectSingleNode("//h1").InnerTextOrNull(),
                Description = details.SelectSingleNode("//div[@class='ProductDescriptionContainer']").InnerTextOrNull(),
                Price       = ParsePrice(details.SelectSingleNode("//em[@class='ProductPrice VariationProductPrice']").InnerTextOrNull()),
                Weight      = ParseDouble(details.SelectSingleNode("//span[@class='VariationProductWeight']").InnerTextOrNull()),
                Images      = String.Join(";", images.Select(s => s.largeimage))
            };

            AddWareInfo(item);

            OnItemLoaded(null);
            MessagePrinter.PrintMessage("Product '" + item.Title + "' details processed");
            StartOrPushPropertiesThread();
        }
Beispiel #8
0
        public new static void PrintTradeSearchResult(TradeSearchResult msg, object tag)
        {
            MessagePrinter.PrintTradeSearchResult(msg, tag);
            FrontendConnect fc = (FrontendConnect)tag;

            Console.WriteLine("Inserting trade item info");
            MongoDBConnect.connection.InsertTradeItemInfoList(msg.TradeItemList);
            if (msg.TradeItemList != null)
            {
                fc.searchState.seenNumber += msg.TradeItemList.Count;
            }

            fc.searchState.NextSearch(msg.IsMoreResult);
            Console.WriteLine("Trade state: {0}", fc.State);
            Console.WriteLine("Found {0} items", fc.searchState.seenNumber);
            if (fc.State == LoginState.WaitSearch)
            {
                fc.State = LoginState.ContinueSearch;
            }
        }
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Location:\n\tCID=");
            sb.Append(CID);
            sb.Append("\n\tX=");
            sb.Append(X);
            sb.Append("\n\tY=");
            sb.Append(Y);
            sb.Append("\n\tVx=");
            sb.Append(Vx);
            sb.Append("\n\tVy=");
            sb.Append(Vy);
            sb.Append("\n\tYaw=");
            sb.Append(Yaw);
            sb.Append("\n\tTime=");
            sb.Append(MessagePrinter.DateTimeToString(Time));
            sb.Append("\n\tChannel=");
            sb.Append(Channel);
            return(sb.ToString());
        }
        public TradeItem(TradeItemInfo item)
        {
            Attributes    = new BsonDocument();
            TID           = item.TID;
            CID           = item.CID;
            CharacterName = item.ChracterName;
            ItemName      = item.ItemClass;//TODO: translate to user friendly name
            Quantity      = item.ItemCount;
            Price         = item.ItemPrice;
            Attribute     = item.AttributeEX;
            AddColor("Color1", item.color1);
            AddColor("Color2", item.color2);
            AddColor("Color3", item.color3);

            Expire = MessagePrinter.CloseDateToDateTime(item.CloseDate);
            Console.WriteLine("Parsing {0}", item.ItemClass);


            ParseAttribute(item.AttributeEX, item.ItemClass);
            if (item.CloseDate > DaysToSeconds(10))
            {
                Listed = DateTime.UtcNow;
            }
            else
            {
                int[] days = { 1, 3, 7, 10 };

                foreach (int day in days)
                {
                    int seconds = DaysToSeconds(day);
                    if (item.CloseDate <= seconds)
                    {
                        Listed = DateTime.UtcNow.AddSeconds(item.CloseDate - seconds);
                        break;
                    }
                }
            }
            Console.WriteLine("Parsed {0}", item.ItemClass);
        }
        public override void CreateTable(DataTable table, DataInsertMethod insert_method, bool PrepareTableForInsert)
        {
            //insert_method = DataInsertMethod.Normal;
            if (Connected)
            {
                base.CreateTable(table, insert_method, PrepareTableForInsert);

                string sqlsc;
                sqlsc = "CREATE TABLE " + table.TableName + "(";
                for (int i = 0; i < table.Columns.Count; i++)
                {
                    sqlsc += "\n" + table.Columns[i].ColumnName;
                    if (table.Columns[i].DataType.ToString().Contains("System.Int32") && !table.Columns[i].AutoIncrement)
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Int32") && table.Columns[i].AutoIncrement)
                    {
                        sqlsc += " serial";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Int64"))//--если будут ошибки, то заменить на bigint
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.DateTime"))
                    {
                        sqlsc += " date";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Decimal"))
                    {
                        sqlsc += " decimal";//--возможны ошибки
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.String"))
                    {
                        if (table.Columns[i].MaxLength <= 8000)
                        {
                            sqlsc += " varchar(" + (table.Columns[i].MaxLength > -1 ? table.Columns[i].MaxLength.ToString() : "50") + ")";
                        }
                        else
                        {
                            sqlsc += " text";
                        }
                    }

                    /*else if (table.Columns[i].DataType.ToString().Contains("System.Single"))
                     *  sqlsc += " single";*/
                    else if (table.Columns[i].DataType.ToString().Contains("System.Double"))
                    {
                        sqlsc += " real";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Guid"))
                    {
                        sqlsc += " UUID";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Boolean"))
                    {
                        sqlsc += " boolean";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Byte"))
                    {
                        sqlsc += " smallint";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Int16"))
                    {
                        sqlsc += " smallint";
                    }
                    else
                    {
                        sqlsc += " varchar(" + (table.Columns[i].MaxLength > -1 ? table.Columns[i].MaxLength.ToString() : "50") + ")";
                    }


                    //if (table.Columns[i].AutoIncrement)//--будут проблемы....
                    //    sqlsc += " serial";// +table.Columns[i].AutoIncrementSeed.ToString() + "," + table.Columns[i].AutoIncrementStep.ToString() + ")";
                    if (!table.Columns[i].AllowDBNull)
                    {
                        sqlsc += " NOT NULL ";
                    }
                    if (table.Columns[i].DefaultValue != null && table.Columns[i].DefaultValue != DBNull.Value)
                    {
                        sqlsc += " DEFAULT " + table.Columns[i].DefaultValue.ToString();
                    }
                    sqlsc += ",";
                }

                if (table.PrimaryKey.Length > 0)
                {
                    string pks = "\nCONSTRAINT PK_" + table.TableName + " PRIMARY KEY (";
                    for (int i = 0; i < table.PrimaryKey.Length; i++)
                    {
                        pks += table.PrimaryKey[i].ColumnName + ",";
                    }
                    pks    = pks.Substring(0, pks.Length - 1) + ")";
                    sqlsc += pks;
                    sqlsc  = sqlsc + ");";
                }
                else
                {
                    sqlsc = sqlsc.Substring(0, sqlsc.Length - 1) + ");";
                }

                ExecuteCommand(CreateCommand(sqlsc).ExecuteNonQuery);

                if (_last_error == 0)//--Если табличка успешно создана, то надо ее заполнить
                {
                    if (insert_method == DataInsertMethod.Normal)
                    {
                        InsertDataToDb(table, _parameters_prefix, PrepareTableForInsert);
                    }
                    if (insert_method == DataInsertMethod.FastIfPossible)
                    {
                        BeginTransaction();
                        InsertDataToDbBulkMethod(table);
                        CommitTransaction();
                    }
                }
                else
                {
                    if (MessagePrinter != null)
                    {
                        MessagePrinter.PrintMessage(ErrorsManager.Messages.DBErrorMsg, ErrorsManager.Messages.ErrorMsg, 1, 1);
                    }
                }
            }
            else
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(ErrorsManager.Messages.NotConnectedMsg, ErrorsManager.Messages.ErrorMsg, 1, 1);
                }
            }
        }
        protected override void BuildNeuralNetwork(ITrainingDatasetDefinition datasetDefinition)
        {
            _input = datasetDefinition.AsInputFor(this);

            TrainingDataset      = datasetDefinition.BuildDatasetIfNotPresent();
            NetworkConfiguration = new ConvolutionalNeuralNetworkConfiguration(
                _input.ScaledForConvolutionalNetwork(this),
                (int)datasetDefinition.LabelsAmount,
                ClassifierName);

            //INPUT -> CONV -> RELU -> MAX POOL -> CONV -> RELU -> MAX POOL -> FC

            //28x28x1 -> 14x14x4
            NetworkConfiguration.AppendConvolutionLayer(
                new ConvolutionParams
            {
                FilterSize             = new Dimension2D(3, 3),
                Channels               = 1,
                OutputFeatureMapsCount = 4,
                Stride = new Stride3D(1, 1, 1)
            }, Device);

            NetworkConfiguration.AppendReluActivation();
            NetworkConfiguration.AppendPoolingLayer(
                new PoolingParams
            {
                Type          = PoolingType.Max,
                PoolingWindow = new Dimension2D(3, 3),
                Stride        = new Stride2D(2, 2)
            });

            //14x14x4 -> 7x7x8
            NetworkConfiguration.AppendConvolutionLayer(
                new ConvolutionParams
            {
                FilterSize             = new Dimension2D(3, 3),
                Channels               = 4,
                OutputFeatureMapsCount = 8,
                Stride = new Stride3D(1, 1, 4)
            }, Device);

            NetworkConfiguration.AppendTanHActivation();
            NetworkConfiguration.AppendPoolingLayer(
                new PoolingParams
            {
                Type          = PoolingType.Max,
                PoolingWindow = new Dimension2D(3, 3),
                Stride        = new Stride2D(2, 2)
            });

            //Fully Connect
            NetworkConfiguration.AppendFullyConnectedLinearLayer(Device);

            _networkClassifier = NetworkConfiguration.Evaluate();

            MessagePrinter.PrintMessage(NetworkConfiguration.ToString());

            _labels = CNTKLib.InputVariable(new int[] { (int)datasetDefinition.LabelsAmount }, DataType.Float, LabelsStreamName);
            _trainingLossFunction = CNTKLib.CrossEntropyWithSoftmax(new Variable(_networkClassifier), _labels, LossFunctionName);
            _evaluationFunction   = CNTKLib.ClassificationError(new Variable(_networkClassifier), _labels, ClassificationErrorName);
        }
Beispiel #13
0
        public override void CreateTable(DataTable table, DataInsertMethod insert_method, bool PrepareTableForInsert)
        {
            if (Connected)
            {
                base.CreateTable(table, insert_method, PrepareTableForInsert);

                string sqlsc;
                sqlsc = "CREATE TABLE " + table.TableName + "(";
                for (int i = 0; i < table.Columns.Count; i++)
                {
                    sqlsc += "" + table.Columns[i].ColumnName;
                    if (table.Columns[i].DataType.ToString().Contains("System.Int32"))
                    {
                        sqlsc += " number";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.DateTime"))
                    {
                        sqlsc += " datetime";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.String"))
                    {
                        sqlsc += " varchar2(" + (table.Columns[i].MaxLength > -1 ? table.Columns[i].MaxLength.ToString() : "50") + ")";
                    }

                    /*else if (table.Columns[i].DataType.ToString().Contains("System.Single"))
                     *  sqlsc += " single ";*/
                    else if (table.Columns[i].DataType.ToString().Contains("System.Double"))
                    {
                        sqlsc += " float";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Guid"))
                    {
                        sqlsc += " raw(32)";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Boolean"))
                    {
                        sqlsc += " number(1)";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Byte"))
                    {
                        sqlsc += " number(1)";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Int16"))
                    {
                        sqlsc += " number";
                    }
                    else
                    {
                        sqlsc += " varchar2(" + (table.Columns[i].MaxLength > -1 ? table.Columns[i].MaxLength.ToString() : "50") + ")";
                    }


                    #warning Придумать как сделать создание сиквенцов и привязку триггера

                    /*if (table.Columns[i].AutoIncrement)
                     *  sqlsc += " IDENTITY(" + table.Columns[i].AutoIncrementSeed.ToString() + "," + table.Columns[i].AutoIncrementStep.ToString() + ") ";*/
                    if (!table.Columns[i].AllowDBNull)
                    {
                        sqlsc += " NOT NULL";
                    }
                    if (table.Columns[i].DefaultValue != null && table.Columns[i].DefaultValue != DBNull.Value)
                    {
                        sqlsc += " DEFAULT " + table.Columns[i].DefaultValue.ToString();
                    }
                    sqlsc += ",";
                }

                if (table.PrimaryKey.Length > 0)
                {
                    string pks = "CONSTRAINT PK_" + table.TableName + " PRIMARY KEY (";
                    for (int i = 0; i < table.PrimaryKey.Length; i++)
                    {
                        pks += table.PrimaryKey[i].ColumnName + ",";
                    }
                    pks    = pks.Substring(0, pks.Length - 1) + ")";
                    sqlsc += pks;
                    sqlsc  = sqlsc + ")";
                }
                else
                {
                    sqlsc = sqlsc.Substring(0, sqlsc.Length - 1) + ");";
                }

                ExecuteCommand(CreateCommand(sqlsc).ExecuteNonQuery);

                if (_last_error == 0)//--Если табличка успешно создана, то надо ее заполнить
                {
                    if (insert_method == DataInsertMethod.Normal)
                    {
                        InsertDataToDb(table, _parameters_prefix, PrepareTableForInsert);
                    }
                    if (insert_method == DataInsertMethod.FastIfPossible)
                    {
                        InsertDataToDbBulkMethod(table);
                    }
                }
            }
            else
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(ErrorsManager.Messages.NotConnectedMsg, ErrorsManager.Messages.ErrorMsg, 1, 1);
                }
            }
        }
Beispiel #14
0
        private void ProcessProductPagerPage(ProcessQueueItem pqi)
        {
            if (cancel)
            {
                return;
            }


            var wi   = (ExtWareInfo)pqi.Item;
            var html = PageRetriever.ReadFromServer(pqi.URL);
            var doc  = CreateDoc(html);

            pqi.Processed = true;

            var pages = doc.DocumentNode.SelectNodes("//ul[@class='PagingList'][1]/li/a[@href]");

            if (pages == null)
            {
                wi.Page = 1;

                lock (this)
                {
                    lstProcessQueue.Add(new ProcessQueueItem
                    {
                        Item     = wi,
                        ItemType = ProcessLevels.ProductList,
                        URL      = pqi.URL
                    });
                }
            }
            else
            {
                wi.Page = 1;

                lock (this)
                {
                    lstProcessQueue.Add(new ProcessQueueItem
                    {
                        Item     = wi,
                        ItemType = ProcessLevels.ProductList,
                        URL      = pqi.URL
                    });
                }

                foreach (var page in pages)
                {
                    var name = page.InnerTextOrNull();

                    if (string.IsNullOrWhiteSpace(name))
                    {
                        Log.Warn(page, new NullReferenceException());
                        continue;
                    }

                    wi.Page = ParseInt(name);

                    lock (this)
                    {
                        lstProcessQueue.Add(new ProcessQueueItem
                        {
                            Item     = wi,
                            ItemType = ProcessLevels.ProductList,
                            URL      = page.AttributeOrNull("href")
                        });
                    }
                }
            }

            OnItemLoaded(null);
            pqi.Processed = true;

            MessagePrinter.PrintMessage("Product pager processed");
            StartOrPushPropertiesThread();
        }
Beispiel #15
0
 public new static void PrintCharacterCommonInfoMessage(CharacterCommonInfoMessage msg, object tag)
 {
     MessagePrinter.PrintCharacterCommonInfoMessage(msg, tag);
 }
Beispiel #16
0
        public override void CreateTable(DataTable table, DataInsertMethod insert_method, bool PrepareTableForInsert)
        {
            if (Connected)
            {
                base.CreateTable(table, insert_method, PrepareTableForInsert);

                string sqlsc;
                sqlsc = "CREATE TABLE " + table.TableName + "(";
                for (int i = 0; i < table.Columns.Count; i++)
                {
                    sqlsc += "\n" + table.Columns[i].ColumnName;
                    if (table.Columns[i].DataType.ToString().Contains("System.Int32"))
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.DateTime"))
                    {
                        sqlsc += " text";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.String"))
                    {
                        sqlsc += " text";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Single"))
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Double"))
                    {
                        sqlsc += " real";
                    }

                    /*else if (table.Columns[i].DataType.ToString().Contains("System.Double"))
                     *  sqlsc += " integer";*/
                    else if (table.Columns[i].DataType.ToString().Contains("System.Guid"))
                    {
                        sqlsc += " text";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Boolean"))
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Byte"))
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Int16"))
                    {
                        sqlsc += " integer";
                    }
                    else if (table.Columns[i].DataType.ToString().Contains("System.Byte[]"))
                    {
                        sqlsc += " blob";
                    }
                    else
                    {
                        sqlsc += " text";
                    }

                    /*if (table.Columns[i].AutoIncrement)
                     *  sqlsc += " AUTOINCREMENT(" + table.Columns[i].AutoIncrementSeed.ToString() + "," + table.Columns[i].AutoIncrementStep.ToString() + ")";*/
                    if (!table.Columns[i].AllowDBNull)
                    {
                        sqlsc += " NOT NULL";
                    }
                    if (table.Columns[i].DefaultValue != null && table.Columns[i].DefaultValue != DBNull.Value)
                    {
                        sqlsc += " DEFAULT " + table.Columns[i].DefaultValue.ToString();
                    }
                    sqlsc += ",";
                }

                if (table.PrimaryKey.Length > 0)
                {
                    string pks = "\nCONSTRAINT PK_" + table.TableName + " PRIMARY KEY (";
                    for (int i = 0; i < table.PrimaryKey.Length; i++)
                    {
                        pks += table.PrimaryKey[i].ColumnName + ",";
                    }
                    pks    = pks.Substring(0, pks.Length - 1) + ")";
                    sqlsc += pks;
                    sqlsc  = sqlsc + ")";
                }
                else
                {
                    sqlsc = sqlsc.Substring(0, sqlsc.Length - 1) + ");";
                }

                ExecuteCommand(CreateCommand(sqlsc).ExecuteNonQuery);

                if (_last_error == 0)//--Если табличка успешно создана, то надо ее заполнить
                {
                    if (insert_method == DataInsertMethod.Normal)
                    {
                        InsertDataToDb(table, _parameters_prefix, PrepareTableForInsert);
                    }
                    if (insert_method == DataInsertMethod.FastIfPossible)
                    {
                        BeginTransaction();
                        InsertDataToDb(table, _parameters_prefix, PrepareTableForInsert);
                        CommitTransaction();
                    }
                }
            }
            else
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(ErrorsManager.Messages.NotConnectedMsg, ErrorsManager.Messages.ErrorMsg, 1, 1);
                }
            }
        }