public bool DeletePreferenceArea(int preferenceID, string areaIn) { string[] area; string[] dell = new string[] { ", " }; area = areaIn.Split(dell, System.StringSplitOptions.None); DatabaseManager dbManager = new DatabaseManager(); LocationManager locManager = new LocationManager(); return (dbManager.NonReturnQuery("DELETE FROM Preference_Area WHERE Preference_ID = " + preferenceID + " AND Area_ID = " + locManager.AreaID(locManager.CityID(area[1], locManager.ProvinceID(area[0])), area[2]) + ";")); }
public bool AddPreferenceArea(int preferenceID, string areaIn) { string[] area; string[] dell = new string[] { ", " }; area = areaIn.Split(dell, System.StringSplitOptions.None); DatabaseManager dbManager = new DatabaseManager(); LocationManager locManager = new LocationManager(); return (dbManager.NonReturnQuery("INSERT INTO Preference_Area (Preference_ID, Area_ID) values (" + preferenceID + "," + locManager.AreaID(locManager.CityID(area[1], locManager.ProvinceID(area[0])), area[2]) + ");")); }
public bool DeletePreferenceArea(int preferenceID, string areaIn) { string[] area; string[] dell = new string[] { ", " }; area = areaIn.Split(dell, System.StringSplitOptions.None); DatabaseManager dbManager = new DatabaseManager(); LocationManager locManager = new LocationManager(); return(dbManager.NonReturnQuery("DELETE FROM Preference_Area WHERE Preference_ID = " + preferenceID + " AND Area_ID = " + locManager.AreaID(locManager.CityID(area[1], locManager.ProvinceID(area[0])), area[2]) + ";")); }
public bool AddPreferenceArea(int preferenceID, string areaIn) { string[] area; string[] dell = new string[] { ", " }; area = areaIn.Split(dell, System.StringSplitOptions.None); DatabaseManager dbManager = new DatabaseManager(); LocationManager locManager = new LocationManager(); return(dbManager.NonReturnQuery("INSERT INTO Preference_Area (Preference_ID, Area_ID) values (" + preferenceID + "," + locManager.AreaID(locManager.CityID(area[1], locManager.ProvinceID(area[0])), area[2]) + ");")); }