Exemplo n.º 1
0
        public Place AddOutdoorPlace(Place outdoorPlace)
        {
            outdoorPlace.MessageBoardID  = InsertNewMessageBoard();
            outdoorPlace.FriendlyUrlName = outdoorPlace.Name.GetFriendlyUrlName();
            PlaceDA        placeDA        = new PlaceDA();
            Place          place          = placeDA.Insert(outdoorPlace);
            OutdoorPlaceDA outdoorPlaceDA = new OutdoorPlaceDA();

            outdoorPlaceDA.Insert(new OutdoorPlace {
                ID = place.ID, DescriptionImageFile = "default.jpg"
            });

            AddPlaceAreaTag(place.ID, GetAreaTagForCountry((Nation)place.CountryID).ID);

            //-- Send app notification email
            CFLogger.RecordModerateAddPlace(CurrentClimber.ID, outdoorPlace.Name, outdoorPlace.CountryID, outdoorPlace.ClimbfindUrl);

            //-- Refresh the cache
            CFDataCache.CacheAllPlaces();
            //-- Not sure why outdoor places isn't cached?

            return(place);
        }