public void CapitalizeColumn(CsvTable csv, string columnName) { if (csv == null) { return; } int column = csv.LookupColumn(columnName); if (column == -1) { return; } csv.dataColumns[column].Capitalize(); displayManager.DisplayTextFile(csv.dataColumns[column].UniqueElements(), 1000); }
public MatchResultSet MatchAllFacilities(CsvTable csv1, CsvTable csv2) { List <string> results = new List <string>(); if (csv1 == null || csv2 == null) { return(null); } AdminTree admin1 = new AdminTree(csv1, applicationOptions.Country); admin1.AddFacilityNodes(csv1); AdminTree admin2 = new AdminTree(csv2, applicationOptions.Country); admin2.AddFacilityNodes(csv2); AdminIterator adminNodes = new AdminIterator(admin1); MatchResultSet resultsToReturn = new MatchResultSet(); foreach (AdminTreeNode node in adminNodes) { Console.WriteLine(node.Name); if (node.IsFacility) { string path = node.Path; NameSet facilitiesToMatch = admin2.GetFacilities(path); MatchResult result = facilitiesToMatch.FindBestMatch(node.Name); if (GoodMatch(node.Name, result)) { string resultString = path + "\\" + result.ToString(); results.Add(resultString); result.FullPath = path; resultsToReturn.Add(result); } } } displayManager.DisplayTextFile(results, 10000); return(resultsToReturn); }