/*DETAILs :Add a new city in the table * PARAMETERS :Name of the country, and the ID of the continent it will belong to. * RETURN :TRUE if the city has been added, FALSE orthewise * */ public bool addCity(String name, int numPais) { bool added = false; CityCAD city = new CityCAD(); added = city.addCityCAD(name, numPais); return added; }
/* * DETAILS :Delete a city. * PARAMETERS :The id of the city * RETURN :TRUE if the city is deleted, FALSE orthewise * */ public bool deleteCity() { bool added = false; CityCAD city = new CityCAD(); added = city.deleteCityCAD(this.IdCidty); return added; }
/**************************** * Public methods of the class * ***********************/ /*DETAILS :Print all the cities * PARAMETERS :The ID of the country * RETURN :A list of cities * */ public DataSet printCities(String countryName) { DataSet lista = new DataSet(); try { CityCAD city = new CityCAD(); lista = city.printCitiesCAD(countryName); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return lista; }