Пример #1
0
        /*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;
        }
Пример #2
0
        /*
         * 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;
        }
Пример #3
0
 /****************************
 * 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;
 }