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 IndoorPlace UpdateIndoorPlace(IndoorPlace place) { IndoorPlaceDA indoorPlaceDA = new IndoorPlaceDA(); place.FriendlyUrlName = place.Name.GetFriendlyUrlName(); indoorPlaceDA.Update(place); PlaceDA placeDA = new PlaceDA(); placeDA.Update(place); //-- Send app notification email CFLogger.RecordModerateEdit(CurrentClimber.ID, string.Format("{0} updated {1}[c{2}] details at {3}", CurrentClimber.Email, place.Name, place.CountryID, place.ClimbfindUrl)); return(place); }