private static string GetCity(string place_name, string country) { foreach (City city in StaticCalls.GetCityList(Nestoria.GetCountry(false, country))) { if (city.City_Name == place_name) { return(city.City_ID.ToString()); } } return(Nestoria.InsertCity(place_name, country)); }
private static void Write_Log_Txt(string path, string place_name, string listing_type, string count, string keywords, string country, bool head) { string[] obj = new string[15] { "-------------------------------------------------------------------------------------------------------------------------\r\n -------------------------------------- ", null, null, null, null, null, null, null, null, null, null, null, null, null, null }; DateTime now = DateTime.Now; obj[1] = now.ToShortDateString(); obj[2] = " | "; now = DateTime.Now; obj[3] = now.ToShortTimeString(); obj[4] = " ("; obj[5] = Nestoria.GetCountry(true, country); obj[6] = ", "; obj[7] = place_name; obj[8] = ", "; obj[9] = listing_type; obj[10] = ", "; obj[11] = count; obj[12] = ", "; obj[13] = keywords; obj[14] = ")------------------------------------------"; string text = string.Concat(obj); string text2 = "------------------------------------------------------------------------------------------------------------------------------------\r\n ------------------------------------------------------------------------------------------------------------------------------------"; if (head) { StaticCalls.send_text(text); StaticCalls.send_text("Sending Requst...."); StaticCalls.send_text("File Recived: "); StaticCalls.send_text(File.ReadAllText(path)); } else { StaticCalls.send_text(text2); } }
private static string InsertCity(string city_Name, string country) { return(StaticCalls.InsertCity(StaticCalls.GetCityData(Nestoria.GetCountry(true, country), city_Name, Nestoria.GetCountry(false, country)))); }
private static List <Property_Nestoria> ProccessData(string path, string place_name, string listing_type, string count, string keywords, string country) { StaticCalls.send_text("Diagnostic Data"); StaticCalls.send_text("Converting XML to List !"); List <Property_Nestoria> list = Nestoria.writeXmlToList(path); if (list.Count > 0) { StaticCalls.send_text("-----------------------------------------------------"); StaticCalls.send_text("Writing List to Database !"); Nestoria.WriteListToDatabase(list, Nestoria.GetGarden(keywords), Nestoria.GetCity(place_name, country), Nestoria.GetCountry(false, country), Nestoria.GetBuy(listing_type), Nestoria.User_ID, HttpContext.Current); StaticCalls.send_text("-----------------------------------------------------"); StaticCalls.send_text("Done !"); } else { StaticCalls.send_text("Check Parameters"); } return(list); }