Beispiel #1
0
 /*USED IN ADDING FAVORITE PROCESS
  *
  * DETAILS      :Add a favorite in the DB
  * PARAMETERS   :The name of favorite, the city, the country and the ID of the user
  * RETURN       :TRUE is the favorite is added, FALSE orthewise
  * */
 public bool addFavorite(int idUser, String city, String country)
 {
     bool added = false;
     FavoriteCAD fav = new FavoriteCAD();
     added = fav.addFavoriteCAD(idUser, city, country);
     return added;
 }
Beispiel #2
0
        /*DELETE A FAVORITE
         *
         * DETAILS      :Delete a favorite
         * PARAMETERS   :Id of the favorite
         * RETURN       :TRUE is the favorite is delete, FALSE orthewise
         * */
        public bool deleteFavorite(int favID)
        {
            bool added = false;
            FavoriteCAD fav = new FavoriteCAD();

            added = fav.deleteFavoriteCAD(favID);

            return added;
        }
Beispiel #3
0
        /**********************************
         * Publics methods of the class
         * ***************************************/
        /**DETAILS      :Print all the favorites of a given user
         * PARAMETERS   :The ID of the user
         * RETURN       :A collection (DATASET) of favorites
         * */
        public DataSet printMyFavorites(int userID)
        {
            DataSet lista = new DataSet();

            FavoriteCAD fav = new FavoriteCAD();

            lista = fav.printMyFavoritesCAD(userID);

            return lista;
        }