Пример #1
0
        private void SaveOutdoorCragPicture(OutdoorCrag crag)
        {
            OutdoorCragDA da = new OutdoorCragDA();

            da.Update(crag);
            CFLogger.RecordModerateEdit(CurrentClimber.ID, string.Format("Changed picture for outdoor crag {0}[{1}]", crag.Name, crag.ID));
        }
Пример #2
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);
        }
        protected void CreateCrag_Click(Object sender, EventArgs e)
        {
            if (PeterBlum.VAM.Globals.Page.IsValid)
            {
                //-- Validate country is not unknown or UK

                string friendlyUrlName = NameTxB.Text.Replace(" ", "-").ToLower();

                OutdoorCrag crag = new OutdoorCrag
                {
                    CreatedByUserID = UserID,
                    Description     = DescriptionTxB.Text,
                    Access          = AccesssTxB.Text,
                    Approach        = ApproachTxB.Text,
                    History         = HistoryTxB.Text,
                    FriendlyUrlName = friendlyUrlName,
                    Name            = NameTxB.Text,
                    PlaceID         = Place.ID,
                    Type            = (int)CragType.Wall,
                    Mosquitoes      = GetBoolSelection(YesMosquitoRB, NoMosquitoRB),
                    HasAlpine       = HasAlpineCB.Checked,
                    HasBoulder      = HasBoulderCB.Checked,
                    HasBuildering   = HasBuilderingCB.Checked,
                    HasDWS          = HasDeepWaterSoloingCB.Checked,
                    HasIce          = HasIceCB.Checked,
                    HasLead         = HasLeadCB.Checked,
                    HasMultipitch   = HasMultipitchCB.Checked,
                    HasSolo         = HasSoloCB.Checked,
                    HasSport        = HasSportCB.Checked,
                    HasTopRope      = HasTopRopeCB.Checked,
                    HasTrad         = HasTradCB.Checked,

                    //ClimbingSummerAM = GetBoolSelection(SummerAMYes, SummerAMNo),
                    //ClimbingSummerPM = GetBoolSelection(SummerPMYes, SummerPMNo),
                    //ClimbingWinterAM = GetBoolSelection(WinterAMYes, WinterAMNo),
                    //ClimbingWinterPM = GetBoolSelection(WinterPMYes, WinterPMNo)
                };

                cfController.AddOutdoorCrag(crag, Place);

                RedirectTo <PlacesController>(c => c.DetailCrag(Place.FriendlyUrlLocation, Place.FriendlyUrlName, crag.FriendlyUrlName));
            }
        }
Пример #4
0
 public void SaveOutdoorCragPicture3(OutdoorCrag crag, string imageFileName, byte[] imageBytes)
 {
     crag.DescriptionImageFile3         = ImageManager.SaveOutdoorCragImage(imageFileName, imageBytes, crag.ID, crag.FriendlyUrlName);
     crag.DescriptionImageFile3ByUserID = CurrentClimber.ID;
     SaveOutdoorCragPicture(crag);
 }
 public OutdoorCrag UpdateOutdoorCrag(OutdoorCrag crag)
 {
     return(new OutdoorCragDA().Update(crag));
 }