Ejemplo n.º 1
0
        /*DETAILs       :Add a new country in the table
         * PARAMETERS   :Name of the country, and the ID of the continent it will belong to.
         * RETURN       :TRUE if the country has been added, FALSE orthewise
         * */
        public bool addCountry(String name, int numContinent)
        {
            bool added = false;

            CountryCAD pays = new CountryCAD();

            added = pays.addCountryCAD(name, numContinent);

            return added;
        }
Ejemplo n.º 2
0
        /*
         * DETAILS      :Delete a country.
         * PARAMETERS   :The id of the country
         * RETURN       :TRUE if the country is deleted, FALSE orthewise
         * */
        public bool deleteCountryCAD()
        {
            bool added = false;

            CountryCAD pays = new CountryCAD();

            added = pays.deleteCountryCAD(this.IdCountry);

            return added;
        }
Ejemplo n.º 3
0
        /****************************
         * Public methods of the class
         * ***********************/
        /*DETAILS       :Print all the countries
         * PARAMETERS   :The ID of the continent
         * RETURN       :A list of countries
         * */
        public ArrayList printCountries(int numContinent)
        {
            ArrayList lista = new ArrayList();

            CountryCAD pays = new CountryCAD();
            lista=pays.printCountriesCAD(numContinent);
            return lista;
        }