public override void EvaluateData() { if (reading) { const string path = @"E:\BACHELORS WORK\TIMETABLE\DataCollectionApp\BugsReport.txt"; if (missingValues.Count != 0 || duplicates.Count != 0) { using (StreamWriter sw = new StreamWriter(path, true, System.Text.Encoding.Default)) { sw.WriteLine("{0:g}", DateTime.Now); sw.WriteLine("ТИПИ АУДИТОРІЙ."); sw.WriteLine("Файл: " + FileName); } } if (missingValues.Count != 0) { using (StreamWriter sw = new StreamWriter(path, true, System.Text.Encoding.Default)) { sw.WriteLine("Є пропуски в рядках: "); foreach (int value in missingValues) { sw.Write(value + "|"); } sw.WriteLine(); } } if (duplicates.Count != 0) { using (StreamWriter sw = new StreamWriter(path, true, System.Text.Encoding.Default)) { sw.WriteLine("Є дублікати: "); foreach (KeyValuePair <int, string> duplicate in duplicates) { sw.WriteLine("В рядку номер " + duplicate.Key + ": " + duplicate.Value); } sw.WriteLine(); } } bool noSensetoReload = true; ArrayList auditoryTypesInDB = new ArrayList(); auditoryTypesInDB = dbo.getAuditory_types(); foreach (string record in records) { if (!auditoryTypesInDB.Contains(record)) { noSensetoReload = false; break; } } if (noSensetoReload) { reading = false; MessageBox.Show("Дані про типи аудиторій вже містяться в базі даних!"); } } }