Example #1
0
        private void ModelCommon_EvntHeaderReady(object sender, BoolEventArgs e)
        {
            IModels header = readerModelCommon.columnNames;

            //make DB and tables by header of text table
            (dBOperations as SQLiteModelDBOperations).PrepareTablesForCommonModel(header);

            //write into Log status info
            AddLineAtTextBoxResultShow($"Количество столбцов в заголовке: {header.ToList().Count}");
            AddLineAtTextBoxResultShow(header.ToString());
        }
Example #2
0
        /// <summary>
        /// Print information about the current status the importing stage
        /// </summary>
        /// <param name="listModels">Imported data' list</param>
        /// <param name="totalReadRow">read total rows summary till the current moment</param>
        public void WriteFewModelsInLog(IList <IModels> listModels, int totalReadRow)
        {
            SetAdminStatusLabelText($"Всего импортировано строк: {totalReadRow}");
            AddLineAtTextBoxResultShow("");
            int     numberModel = 0;
            IModels model       = listModels.ElementAt(numberModel);

            AddLineAtTextBoxResultShow($"Элемент {numberModel}: {model.ToString()}");

            if (listModels?.Count > 100)
            {
                numberModel = 100;
                model       = listModels.ElementAt(numberModel);
                AddLineAtTextBoxResultShow($"Элемент {numberModel}: {model.ToString()}");

                if (listModels?.Count > 1000)
                {
                    numberModel = 1000;
                    model       = listModels.ElementAt(numberModel);
                    AddLineAtTextBoxResultShow($"Элемент {numberModel}: {model.ToString()}");
                }
            }
        }