public Place Update(IndoorPlace indoorPlace) { NameValueCollection propsAndVals = indoorPlace.GetProperyNameAndValues(); propsAndVals.Remove("ClimbfindUrl"); // causes exception because it does not have a setter. Place place = MapValues(new Place(), propsAndVals); return(base.Update(place)); }
public void SaveIndoorPlaceLogo(IndoorPlace place, string imageFileName, byte[] imageBytes) { place.LogoImageFile = ImageManager.SaveIndoorPlaceLogo(imageFileName, imageBytes, place.ID, place.FriendlyUrlName); new IndoorPlaceDA().Update(place); Place basePlace = new PlaceDA().GetByID(place.ID); basePlace.PrimaryImageFile = place.LogoImageFile; new PlaceDA().Update(basePlace); //-- Refresh the cache CFDataCache.CacheAllIndoorPlaces(); }
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); }
//-- Methods public static O GetIndoorPlaceProp <O>(IndoorPlaceGetterDelegate getMethod, int placeID) where O : class { IndoorPlace place = indoorPlaceDIC[placeID]; return((O)getMethod.DynamicInvoke(place)); }