private void SaveOutdoorPlacePicture(OutdoorPlace place) { OutdoorPlaceDA da = new OutdoorPlaceDA(); da.Update(place); CFLogger.RecordModerateEdit(CurrentClimber.ID, string.Format("Changed picture for outdoor place {0}[{1}]", place.Name, place.ID)); }
public OutdoorPlace UpdateOutdoorPlace(OutdoorPlace outdoorPlace) { OutdoorPlaceDA outdoorPlaceDA = new OutdoorPlaceDA(); outdoorPlace.DescriptionLastUpdated = DateTime.Now; outdoorPlace.DescriptionByUserID = CurrentClimber.ID; outdoorPlace.FriendlyUrlName = outdoorPlace.Name.GetFriendlyUrlName(); outdoorPlaceDA.Update(outdoorPlace); PlaceDA placeDA = new PlaceDA(); placeDA.Update(outdoorPlace); //-- Send app notification email CFLogger.RecordModerateEdit(CurrentClimber.ID, string.Format("{0} updated {1}[c{2}] details at {3}", CurrentClimber.Email, outdoorPlace.Name, outdoorPlace.CountryID, outdoorPlace.ClimbfindUrl)); return(outdoorPlace); }
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); }