public void SqlAir() { Path p = new Path(); string[] lines = File.ReadAllLines(p.AirPath()); string[] partlines; List <string> gradovi = SQLHelper.GetCitiesName(); foreach (var l in lines) { partlines = l.Split(','); for (int i = 0; i < 14; i++) { partlines[i] = partlines[i].Trim('\'', '\"'); partlines[i].Replace("\\N", "NULL"); string item = partlines[i].ToString(); StringBuilder msg = new StringBuilder(partlines[i].Length); for (int j = 0; j < item.Length; j++) { if (item[j] != '\'') { msg.Append(item[j]); } } partlines[i] = msg.ToString(); } foreach (var item in gradovi) { if (partlines[2].ToString() == item) { InsertAirs(Guid.NewGuid().ToString(), partlines[1], partlines[2], partlines[3], partlines[4], partlines[5], partlines[6], partlines[7], partlines[8], partlines[9], partlines[10], partlines[11], partlines[12], partlines[13]); } } } }
public List <string> GetAllCities() { List <string> temp = SQLHelper.GetCitiesName(); return(temp); }