Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public Place Update(OutdoorPlace outdoorPlace)
        {
            NameValueCollection propsAndVals = outdoorPlace.GetProperyNameAndValues();

            propsAndVals.Remove("ClimbfindUrl"); // causes exception because it does not have a setter.
            Place place = MapValues(new Place(), propsAndVals);

            return(base.Update(place));
        }
Ejemplo n.º 3
0
        public void SaveOutdoorPlacePicture1(OutdoorPlace place, string imageFileName, byte[] imageBytes)
        {
            place.DescriptionImageFile         = ImageManager.SaveOutdoorPlaceImage(imageFileName, imageBytes, place.ID, place.FriendlyUrlName);
            place.DescriptionImageFileByUserID = CurrentClimber.ID;
            SaveOutdoorPlacePicture(place);

            Place basePlace = new PlaceDA().GetByID(place.ID);

            basePlace.PrimaryImageFile = place.DescriptionImageFile;
            new PlaceDA().Update(basePlace);
        }
Ejemplo n.º 4
0
        protected void AddYouTubeMovie_Click(Object sender, EventArgs e)
        {
            // DO validation
            if (PeterBlum.VAM.Globals.Page.IsValid)
            {
                string youTubeUrl = YouTubeUrlTxB.Text.Trim();
                cfController.AddCragYouTubeMovie(Crag.ID, youTubeUrl, YouTubeTitleTxB.Text, YouTubeDescriptionTxB.Text);

                place = cfController.GetOutdoorPlace(Crag.PlaceID);
                RedirectTo <PlacesController>(c => c.DetailCrag(place.FriendlyUrlLocation, place.FriendlyUrlName, Crag.FriendlyUrlName));
            }
        }
Ejemplo n.º 5
0
        public OutdoorCrag AddOutdoorCrag(OutdoorCrag crag, OutdoorPlace place)
        {
            crag.MessageBoardID = InsertNewMessageBoard();
            crag.ID             = Guid.NewGuid();

            OutdoorCragDA da = new OutdoorCragDA();

            OutdoorCrag newCrag = da.Insert(crag);

            //-- Send app notification email
            CFLogger.RecordModerateAddCrag(CurrentClimber.ID, newCrag.Name, place.CountryID, newCrag.ClimbfindUrl);

            return(newCrag);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
 public void SaveOutdoorPlacePicture3(OutdoorPlace place, string imageFileName, byte[] imageBytes)
 {
     place.DescriptionImageFile3         = ImageManager.SaveOutdoorPlaceImage(imageFileName, imageBytes, place.ID, place.FriendlyUrlName);
     place.DescriptionImageFile3ByUserID = CurrentClimber.ID;
     SaveOutdoorPlacePicture(place);
 }
 protected void Page_Init(object sender, EventArgs e)
 {
     place = cfController.GetOutdoorPlace(crag.PlaceID);
 }