Ejemplo n.º 1
0
        public ActionResult NewsItem()
        {
            if (Session["BXGOwner"] == null)
            {
                if (Session["_path_info"] != null)
                {
                    Session["_path_info"] = Request.RawUrl;
                }

                Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true);
            }

            var model = NewsItemMapper.Map(CurrentPage);

            model = MasterMapper.Map(model, CurrentPage);

            if (string.IsNullOrWhiteSpace(model.RedirectUrl))
            {
                return(View("NewsItem", model));
            }
            else
            {
                return(Redirect(model.RedirectUrl));
            }
        }
Ejemplo n.º 2
0
        public ActionResult ReservationsLists()
        {
            BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];
            ReservationListModel myReservations = ReservationListMapper.Map(CurrentPage);

            myReservations = MasterMapper.Map(myReservations, CurrentPage);


            string reservationNo = String.Empty;
            string resortNo      = String.Empty;

            if (TempData["ReservationNo"] != null && TempData["ResortNo"] != null)
            {
                reservationNo = TempData["ReservationNo"].ToString();
                resortNo      = TempData["ResortNo"].ToString();
            }

            if (reservationNo != String.Empty && resortNo != String.Empty)
            {
                ReservationDetailModel detailsModel = new ReservationDetailModel();
                detailsModel.ReservationNo = reservationNo;
                detailsModel.ResortNo      = resortNo;
                myReservations.DetailModel = detailsModel;
            }

            ReservationListModel myreservation = new ReservationListModel();

            PopulateAllReservations(myreservation);
            Response.Redirect(ConfigurationManager.AppSettings["bxgwebSitecoremyReservationRedirectUrl"], true);
            return(PartialView("ReservationsList", myreservation));
        }
Ejemplo n.º 3
0
        // GET: AreaInformation
        public ActionResult AreaInformation()
        {
            var model = ResortMapper.MapForAreaInformation(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 4
0
        // GET: LocationMapAndDirections
        public ActionResult LocationMapAndDirections()
        {
            var model = ResortMapper.Map(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 5
0
        // GET: ResortFoodAndBeverage
        public ActionResult ResortFoodAndBeverage()
        {
            var model = ResortMapper.MapForFoodAndBeverages(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 6
0
        public ActionResult Resort()
        {
            ResortModel model = ResortMapper.Map(CurrentPage);

            model = MasterMapper.Map(model, CurrentPage);

            return(View(model));
        }
Ejemplo n.º 7
0
        // GET: ResortWeather
        public ActionResult ResortWeather()
        {
            var model = ResortMapper.MapForWeather(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 8
0
        // GET: ResortFloorPlanList
        public ActionResult ResortFloorPlanList()
        {
            var model = ResortMapper.MapForFloorPlans(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View("ResortFloorPlanList", model));
        }
Ejemplo n.º 9
0
        // GET: ResortPointsTable
        public ActionResult ResortPointsTable()
        {
            var model = ResortMapper.MapForPointsTable(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 10
0
        // GET: AvailableAmenities
        public ActionResult AvailableAmenities()
        {
            var model = ResortMapper.MapForAmenities(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// This action will use the current page's parent (the parent is the resort and we need the resort model...it includes the child photo list)
        /// </summary>
        /// <returns></returns>
        public ActionResult ResortPhotoList()
        {
            var model = ResortMapper.MapForPhotos(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 12
0
        // GET: ResortAssociationOwners
        public ActionResult ResortAssociationOwners()
        {
            var model = ResortMapper.MapForAssociationOwners(CurrentPage.Parent);

            model = MasterMapper.Map(model, CurrentPage.Parent);

            return(View(model));
        }
Ejemplo n.º 13
0
        public ActionResult ReservationList()
        {
            if (Session["BXGOwner"] == null)
            {
                if (Session["_path_info"] != null)
                {
                    Session["_path_info"] = Request.RawUrl;
                }

                Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true);
            }

            BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];

            ReservationListModel myReservations = ReservationListMapper.Map(CurrentPage);

            myReservations = MasterMapper.Map(myReservations, CurrentPage);

            HydrateModel(myReservations);

            string reservationNo = String.Empty;
            string resortNo      = String.Empty;

            if (TempData["ReservationNo"] != null && TempData["ResortNo"] != null)
            {
                reservationNo = TempData["ReservationNo"].ToString();
                resortNo      = TempData["ResortNo"].ToString();
            }

            if (reservationNo != String.Empty && resortNo != String.Empty)
            {
                ReservationDetailModel detailsModel = new ReservationDetailModel();
                detailsModel.ReservationNo = reservationNo;
                detailsModel.ResortNo      = resortNo;
                myReservations.DetailModel = detailsModel;
            }

            return(View(myReservations));
        }
Ejemplo n.º 14
0
        public async Task <IEnumerable <RiskFactor> > GetRiskFactors()
        {
            string url = String.Concat(DataConstants.Endpoint, DataConstants.RiskFactorsURL);

            var response = await MakeSessionHttpCall <BaseResponse <RiskFactorData>, string>(url, HttpVerbMethod.Get, null)
                           .ConfigureAwait(false);

            if (response.HasError)
            {
                if (response.info != null && response.info.Count() > 0)
                {
                    response.Message = String.Join("\n", response.info);
                }
                throw new ApiException()
                      {
                          Code  = response.status,
                          Error = response.Message
                      };
            }

            return(MasterMapper.MapRiskFactorList(response.data));
        }
Ejemplo n.º 15
0
        public async Task <IEnumerable <Master> > GetMasterList(MasterType type)
        {
            var param = new DynamicParameters();

            param.Add("@Type", type);

            var mapper = new MasterMapper();

            return(await SqlMapper.QueryAsync(_unitOfWork.Connection,
                                              "GetMaster",
                                              new[]
            {
                typeof(Master)
            },
                                              obj =>
            {
                var history = obj[0] as Master;
                return mapper.Map(history);
            },
                                              param,
                                              splitOn: "Type,ID,Value,ParentID,CreatedOn,ModifiedOn,IsDeleted",
                                              commandType: CommandType.StoredProcedure));
        }
Ejemplo n.º 16
0
        public ActionResult MyPoints()
        {
            ValidateSession();

            //TODO:  Web Service populate of Owner
            BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];
            MyPointsModel myPoints = MyPointsMapper.Map(CurrentPage);

            myPoints = MasterMapper.Map(myPoints, CurrentPage);

            InitializePageView(myPoints);
            HydrateModel(myPoints);

            //return a view

            if (mdlCheckAS400.IsAS400Available())
            {
                return(View(myPoints));
            }
            else
            {
                return(Redirect("../siteMaintenance.aspx"));
            }
        }
Ejemplo n.º 17
0
        public ActionResult PromoItem()
        {
            if (Session["BXGOwner"] == null)
            {
                if (Session["_path_info"] != null)
                {
                    Session["_path_info"] = Request.RawUrl;
                }

                Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true);
            }

            var model = PromoItemMapper.Map(CurrentPage);

            model = MasterMapper.Map(model, CurrentPage);
            string HostUrl           = ConfigurationManager.AppSettings["SitecoreResortUrl"].ToString();
            string SitecoreMapperUrl = string.Empty;

            switch (Request.RawUrl.ToLower().Trim())
            {
            case "/bgmodern/promotions/bgr-qr":
                SitecoreMapperUrl = "/DOPs/BGR-QR";
                break;

            case "/bgmodern/promotions/be-a-friend-refer-a-friend-to-bluegreen":
                SitecoreMapperUrl = "/rewards/sweepstakes";
                break;

            case "/bgmodern/promotions/bgr-or":
                SitecoreMapperUrl = "/DOPs/BGR-OR";
                break;

            case "/bgmodern/promotions/sharing-is-now-more-rewarding":
                SitecoreMapperUrl = "/featured/Sharing-is-Rewarding";
                break;

            case "/bgmodern/promotions/bgr-qr/":
                SitecoreMapperUrl = "/DOPs/BGR-QR";
                break;

            case "/bgmodern/promotions/be-a-friend-refer-a-friend-to-bluegreen/":
                SitecoreMapperUrl = "/rewards/sweepstakes";
                break;

            case "/bgmodern/promotions/bgr-or/":
                SitecoreMapperUrl = "/DOPs/BGR-OR";
                break;

            case "/bgmodern/promotions/sharing-is-now-more-rewarding/":
                SitecoreMapperUrl = "/featured/Sharing-is-Rewarding";
                break;
            }
            if (SitecoreMapperUrl != string.Empty)
            {
                model.RedirectUrl = HostUrl + SitecoreMapperUrl;
            }
            if (string.IsNullOrWhiteSpace(model.RedirectUrl))
            {
                return(View("PromoItem", model));
            }
            else
            {
                return(Redirect(model.RedirectUrl));
            }
        }
        public ActionResult ReservationDetail(string reservationNo, string resortNo, string type)
        {
            if (Session["BXGOwner"] == null)
            {
                if (Session["_path_info"] != null)
                {
                    Session["_path_info"] = Request.RawUrl;
                }

                Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true);
            }

            ReservationDetailModel detailModel = ReservationDetailMapper.Map(CurrentPage);

            detailModel = MasterMapper.Map(detailModel, CurrentPage);

            if (TempData["DetailGuestData"] != null)
            {
                detailModel = ((ReservationDetailModel)TempData["DetailGuestData"]);
                TempData["DetailGuestData"] = detailModel;
            }
            //else if (TempData["DetailModelData"] != null)
            //{
            //    detailModel = ((ReservationDetailModel)TempData["DetailModelData"]);
            //    TempData["DetailModelData"] = detailModel;
            //}
            else
            {
                if (TempData["ErrorText"] != null)
                {
                    detailModel.ErrorText = TempData["ErrorText"].ToString();
                    TempData.Remove("ErrorText");
                }

                if (TempData["UpdateText"] != null)
                {
                    detailModel.UpdateText = TempData["UpdateText"].ToString();
                    TempData.Remove("UpdateText");
                }

                if (TempData["SubmittedForm"] != null)
                {
                    ReservationDetailModel submittedModel = ((ReservationDetailModel)TempData["SubmittedForm"]);
                    detailModel.MessageText           = submittedModel.MessageText;
                    detailModel.SelectedGuest         = submittedModel.SelectedGuest;
                    detailModel.GuestFormFirstName    = submittedModel.GuestFormFirstName;
                    detailModel.GuestFormLastName     = submittedModel.GuestFormLastName;
                    detailModel.GuestFormEmail        = submittedModel.GuestFormEmail;
                    detailModel.GuestFormState        = submittedModel.GuestFormState;
                    detailModel.GuestFormPhone        = submittedModel.GuestFormPhone;
                    detailModel.GuestFormRelationship = submittedModel.GuestFormRelationship;

                    TempData.Remove("SubmittedForm");
                }


                detailModel.ReservationNo        = reservationNo;
                detailModel.ResortNo             = resortNo;
                detailModel.ReservationCondition = type;

                string pageTitleProperty = string.Empty;
                if (type == "Future")
                {
                    pageTitleProperty = "futureReservationPageTitle";
                }
                else if (type == "Past")
                {
                    pageTitleProperty = "pastReservationPageTitle";
                }

                int?reservationListId = Classes.Utilities.WebConfigContentId.GetValue("reservationListContentId");
                if (reservationListId.HasValue)
                {
                    var reservationList = Umbraco.TypedContent(reservationListId.Value);
                    detailModel.Title = reservationList.GetPropertyValue <string>(pageTitleProperty);
                }
            }

            return(View("ReservationDetail", detailModel));
        }