예제 #1
0
        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));
        }
예제 #2
0
        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();
        }
예제 #3
0
        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);
        }
예제 #4
0
        //-- Methods

        public static O GetIndoorPlaceProp <O>(IndoorPlaceGetterDelegate getMethod, int placeID) where O : class
        {
            IndoorPlace place = indoorPlaceDIC[placeID];

            return((O)getMethod.DynamicInvoke(place));
        }