public Place AddIndoorPlace(Place indoorPlace, string address, string contactNumber, string website, bool hasBoulder, bool hasLead, bool hasTopRope) { indoorPlace.MessageBoardID = InsertNewMessageBoard(); indoorPlace.FriendlyUrlName = indoorPlace.Name.GetFriendlyUrlName(); PlaceDA placeDA = new PlaceDA(); Place place = placeDA.Insert(indoorPlace); IndoorPlaceDA indoorPlaceDA = new IndoorPlaceDA(); indoorPlaceDA.Insert(new IndoorPlace { ID = place.ID, Address = address, MapAddress = address, Contact = contactNumber, HasBoulder = hasBoulder, HasLead = hasLead, HasTopRope = hasTopRope, LogoImageFile = "Default.jpg", Latitude = 0, Longitude = 0, Website = website }); AddPlaceAreaTag(place.ID, GetAreaTagForCountry((Nation)place.CountryID).ID); //-- Send app notification email CFLogger.RecordModerateAddPlace(CurrentClimber.ID, indoorPlace.Name, indoorPlace.CountryID, indoorPlace.ClimbfindUrl); //-- Refresh the cache CFDataCache.CacheAllIndoorPlaces(); return(place); }
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); }