示例#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));
            }
        }
示例#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));
        }
        // GET: AreaInformation
        public ActionResult AreaInformation()
        {
            var model = ResortMapper.MapForAreaInformation(CurrentPage.Parent);

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

            return(View(model));
        }
示例#4
0
        // GET: LocationMapAndDirections
        public ActionResult LocationMapAndDirections()
        {
            var model = ResortMapper.Map(CurrentPage.Parent);

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

            return(View(model));
        }
示例#5
0
        // GET: ResortFoodAndBeverage
        public ActionResult ResortFoodAndBeverage()
        {
            var model = ResortMapper.MapForFoodAndBeverages(CurrentPage.Parent);

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

            return(View(model));
        }
示例#6
0
        public ActionResult Resort()
        {
            ResortModel model = ResortMapper.Map(CurrentPage);

            model = MasterMapper.Map(model, CurrentPage);

            return(View(model));
        }
示例#7
0
        // GET: ResortWeather
        public ActionResult ResortWeather()
        {
            var model = ResortMapper.MapForWeather(CurrentPage.Parent);

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

            return(View(model));
        }
示例#8
0
        // GET: ResortFloorPlanList
        public ActionResult ResortFloorPlanList()
        {
            var model = ResortMapper.MapForFloorPlans(CurrentPage.Parent);

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

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

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

            return(View(model));
        }
示例#10
0
        // GET: AvailableAmenities
        public ActionResult AvailableAmenities()
        {
            var model = ResortMapper.MapForAmenities(CurrentPage.Parent);

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

            return(View(model));
        }
        /// <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));
        }
示例#12
0
        // GET: ResortAssociationOwners
        public ActionResult ResortAssociationOwners()
        {
            var model = ResortMapper.MapForAssociationOwners(CurrentPage.Parent);

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

            return(View(model));
        }
        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));
        }
        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));
        }
示例#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));
        }
示例#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"));
            }
        }
示例#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));
        }