Пример #1
0
        private bool NeedsUpdatedOwnerPointValues(BGO.OwnerWS.Owner OldOwner, BGO.OwnerWS.Points NewOwnerPoints)
        {
            bool needsUpdated = false;

            if (OldOwner.PointsTotal != NewOwnerPoints.PointsTotal)
            {
                needsUpdated = true;
            }
            if (OldOwner.PointsTotalAnnual != NewOwnerPoints.PointsTotalAnnual)
            {
                needsUpdated = true;
            }
            if (OldOwner.PointsTotalRestricted != NewOwnerPoints.PointsTotalRestricted)
            {
                needsUpdated = true;
            }
            if (OldOwner.PointsTotalSaved != NewOwnerPoints.PointsTotalSaved)
            {
                needsUpdated = true;
            }
            if (OldOwner.PointsTotalFuture != NewOwnerPoints.PointsTotalFuture)
            {
                needsUpdated = true;
            }

            return(needsUpdated);
        }
        // GET: Owner
        public ActionResult OwnerPointsAndSignOff()
        {
            // TODO : build the code to populate the model with the signed-in owner's data
            BGO.OwnerWS.Owner model = (BGO.OwnerWS.Owner)Session["BXGOwner"] ?? new BGO.OwnerWS.Owner();

            return(PartialView(model));
        }
Пример #3
0
        public ActionResult GetPartialView()
        {
            //mCreditCardModel = new CreditCardInfoModel()
            //TODO:  Web Service populate of Owner
            BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];

            return(PartialView("RemindMeLater"));
        }
Пример #4
0
        public ActionResult SitecoreIndex()
        {
            model = new SiteTopNavModel();

            #region legacy code
            bxgOwner          = (Owner)Session["BXGOwner"];
            TPexpired         = false;
            model.TPRenewLink = false;



            IdentifyNavigatorType();

            TravelerplusLandscape();

            CheckForPointsUpdate(bxgOwner);
            //getFullPath();
            #endregion

            SetMenuItemControlValues(model);

            var root = CurrentPage.AncestorOrSelf(1);

            model.SiteName = root.GetPropertyValue <string>("siteName");
            if (string.IsNullOrWhiteSpace(model.SiteName))
            {
                model.SiteName = root.Name;
            }

            model.Title = CurrentPage.GetPropertyValue <string>("title");
            if (string.IsNullOrWhiteSpace(model.Title))
            {
                model.Title = CurrentPage.Name;
            }

            model.MainNavigation = mapNavigation(root).ToList();

            // Set Owner Details To Model
            model.PointsTotal    = bxgOwner.PointsTotal;
            model.PaymentBalance = bxgOwner.PaymentBalance;

            model.InstallStatus = "NULL";
            if (bxgOwner.InstallmentPlan[0].InstallmentStatus != null)
            {
                model.InstallStatus = bxgOwner.InstallmentPlan[0].InstallmentStatus.Replace(" ", "") == "" ? "NULL" : bxgOwner.InstallmentPlan[0].InstallmentStatus;
            }
            //return PartialView("ResponsiveNavBar", model);
            return(PartialView("SitecoreTopNav", model));
        }
Пример #5
0
 public ActionResult DontRemindMeClick()
 {
     BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];
     if (ModelState.IsValid)
     {
         //redirect to current page to clear the form
         RenewalMsgPopup(Constants.SavePointsDTRemindme);
         string path = BGModern.HtmlExtensions.CustomHtmlHelpers.GetFullSitePath(null).ToString();
         return(Redirect(path + "/Home"));
     }
     else
     {
         //Add Error processing here
         return(CurrentUmbracoPage());
     }
 }
Пример #6
0
        //
        // GET: /SiteTopNav/
        public ActionResult Index()
        {
            model = new SiteTopNavModel();

            #region legacy code
            bxgOwner          = (Owner)Session["BXGOwner"];
            TPexpired         = false;
            model.TPRenewLink = false;

            //if (IsPostBack) {
            //m_BGColor = ViewState("m_BGColor")
            //m_BGMainColor = ViewState("m_BGMainColor")
            //m_ForeColor = ViewState("m_ForeColor")
            //m_iMenuHeight = ViewState("m_iMenuHeight")
            //}

            IdentifyNavigatorType();

            TravelerplusLandscape();

            //getFullPath();
            #endregion

            SetMenuItemControlValues(model);

            var root = CurrentPage.AncestorOrSelf(1);

            model.SiteName = root.GetPropertyValue <string>("siteName");
            if (string.IsNullOrWhiteSpace(model.SiteName))
            {
                model.SiteName = root.Name;
            }

            model.Title = CurrentPage.GetPropertyValue <string>("title");
            if (string.IsNullOrWhiteSpace(model.Title))
            {
                model.Title = CurrentPage.Name;
            }

            model.MainNavigation = mapNavigation(root).ToList();

            //return PartialView("ResponsiveNavBar", model);
            return(PartialView("SiteTopNav", model));
        }
Пример #7
0
        private void RenewalMsgPopup(int opt)
        {
            try
            {
                BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"];
                string MSGRDATE = BXGOwner.AnnualPointsExpiration.SavepointsPopNextDate.ToString();

                TravelerPlusEligibility tp = new TravelerPlusEligibility();
                tp.TPARVACT      = BXGOwner.Arvact;
                tp.TPMsgId       = " ";
                tp.TPNextPopDate = MSGRDATE;
                tp.TPMsgId       = BXGOwner.AnnualPointsExpiration.SavepointsMessageId;
                TravelerPlusRenewDB tprenewdb = new TravelerPlusRenewDB();
                bool processed = tprenewdb.UpdatePopUpMenuOption(tp, opt);
            }
            catch (Exception ex)
            {
            }
        }
Пример #8
0
        private void NewPointsHandler(BGO.OwnerWS.Owner bxgOwner)
        {
            try
            {
                Session["PalettReload"] = false;

                //Populate the Owner object and Session variable.
                BGO.BluegreenOnline.Bluegreenowner.CurrentOwner.OwnerAnnualPoints     = bxgOwner.PointsTotalAnnual.ToString();
                BGO.BluegreenOnline.Bluegreenowner.CurrentOwner.OwnerSavedPoints      = bxgOwner.PointsTotalSaved.ToString();
                BGO.BluegreenOnline.Bluegreenowner.CurrentOwner.OwnerRestrictedPoints = bxgOwner.PointsTotalRestricted.ToString();
                BGO.BluegreenOnline.Bluegreenowner.CurrentOwner.OwnerTotalPoints      = bxgOwner.PointsTotal.ToString();
                BGO.BluegreenOnline.Bluegreenowner.CurrentOwner.OwnerPaymentBalance   = bxgOwner.PaymentBalance.ToString();

                Session["BXGOwner"] = bxgOwner;
            }
            catch (Exception ex)
            {
            }
        }
Пример #9
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"));
            }
        }
Пример #10
0
        private void HydrateModel(OwnerModel owner)
        {
            if (null == HttpContext.Session["ownername"])
            {
                owner.FullName = "unknown"; // do not default to any name
            }
            else
            {
                owner.FullName = HttpContext.Session["ownername"].ToString();
            }

            owner.FullName               = owner.BxgOwner.fullName;
            owner.IsAccountExpired       = owner.BxgOwner.AccountExpired;
            owner.IsPendingOwner         = ((string)Session["IsPendingOwner"]) == "TRUE";
            owner.IsTravelerPlusEligible = owner.BxgOwner.TravelerPlusMembership.IsTravelerPlusEligible;
            owner.HomeProject            = owner.BxgOwner.User[0].HomeProject;
            owner.OwnerContractType      = (string)Session["OwnerContractType"];
            bool btEnabled = false;

            try
            {
                bool.TryParse(Session["BonusTimeEnabled"].ToString(), out btEnabled);
            }
            catch
            {
                btEnabled = false;
            }
            owner.BonusTimeEnabled = btEnabled;
            if (Session["OwnerHomeResortWeeks"] == null)
            {
                owner.OwnerHomeResortWeeks = "0";
            }
            else
            {
                try
                {
                    owner.OwnerHomeResortWeeks = Session["OwnerHomeResortWeeks"].ToString();
                }
                catch
                {
                    owner.OwnerHomeResortWeeks = "0";
                }
            }

            if (owner.OwnerContractType == "Vacation Club" || owner.OwnerContractType == "Sampler")
            {
                owner.DisplayPointsDetail = true;
            }

            if (owner.OwnerContractType != "Sampler")
            {
                owner.PaymentBalance = Convert.ToDecimal(owner.BxgOwner.PaymentBalance);
            }

            if (owner.OwnerContractType == "Vacation Club")
            {
                owner.OwnershipLevel = owner.BxgOwner.membershipLevelDesc;
            }
            else if (owner.OwnerContractType == "Sampler")
            {
                if (owner.HomeProject == "51")
                {
                    owner.OwnershipLevel = "Sampler";
                }
                else if (owner.HomeProject == "52")
                {
                    owner.OwnershipLevel = "Sampler 24";
                }
            }

            if (owner.BxgOwner.OwnerExpiration != null)
            {
                owner.TravelerPlusExpiration = DateTime.Parse(owner.BxgOwner.OwnerExpiration);
            }

            if (Session["PalettReload"] != null && Convert.ToBoolean(Session["PalettReload"]))
            {
                OwnerWS1SoapClient OwnerServiceProxy = new OwnerWS1SoapClient();
                BGO.OwnerWS.Points ownerTotalPoints  = new BGO.OwnerWS.Points();
                BGO.OwnerWS.Owner  bxgOwnerTemp      = OwnerServiceProxy.Authenticate(Session["LoginEmail"].ToString(), Session["LoginPassword"].ToString());
                ownerTotalPoints = OwnerServiceProxy.getTotalPoints(owner.BxgOwner.Arvact);

                if (NeedsUpdatedOwnerPointValues(owner.BxgOwner, ownerTotalPoints))
                {
                    owner.BxgOwner.PointsTotal           = ownerTotalPoints.PointsTotal;
                    owner.BxgOwner.PointsTotalAnnual     = ownerTotalPoints.PointsTotalAnnual;
                    owner.BxgOwner.PointsTotalRestricted = ownerTotalPoints.PointsTotalRestricted;
                    owner.BxgOwner.PointsTotalSaved      = ownerTotalPoints.PointsTotalSaved;
                    owner.BxgOwner.PointsTotalFuture     = ownerTotalPoints.PointsTotalFuture;

                    NewPointsHandler(owner.BxgOwner);
                }
            }

            if (owner.DisplayPointsDetail)
            {
                owner.AvailablePoints  = owner.BxgOwner.PointsTotal;
                owner.AnnualPoints     = owner.BxgOwner.PointsTotalAnnual;
                owner.SavedPoints      = owner.BxgOwner.PointsTotalSaved;
                owner.FuturePoints     = owner.BxgOwner.PointsTotalFuture;
                owner.RestrictedPoints = owner.BxgOwner.PointsTotalRestricted;
                owner.EncoreDividends  = Convert.ToInt32(owner.BxgOwner.EncoreBenefits.DividendsBalance);
            }
        }
Пример #11
0
        private void IdentifyNavigatorType()
        {
            bxgOwner = (BGO.OwnerWS.Owner)HttpContext.Session["BXGOwner"];


            #if STANDALONE
            model.ShowGuestProfile = "";
            model.HomeProject      = "";
            model.ContractType     = "Vacation Club";
            model.AllAccountsFromSecondaryMarketing = false;
            #else
            model.ShowGuestProfile = ((BGO.BluegreenOnline.Bluegreenowner)HttpContext.Session["BluegreenownerForUmbraco"]).OwnerMembershipType;
            if (Session["OwnerContractType"] != null)
            {
                model.ContractType = Session["OwnerContractType"].ToString();
            }
            #endif

            model.AllAccountsFromSecondaryMarketing = bxgOwner.User[0].AllAccountsComesFromSecondaryMarketing;
            model.HomeProject = bxgOwner.User[0].HomeProject;


            if (Server.MapPath("").ToLower().EndsWith("owner"))
            {
                model.NavigatorType = "owner";
            }

            if (model.ContractType == "Vacation Club")
            {
                model.NavigatorType = "owner";
            }

            if (model.ContractType == "Sampler")
            {
                model.NavigatorType = "Sampler";
            }

            if (Session["IsTravelerPlusEmployee"] != null && Session["IsTravelerPlusEmployee"].ToString() == "TRUE")
            {
                model.IsTravelerPlusEmployee = true;
            }

            if (Session["ispremierOwner"] != null && Session["ispremierOwner"].ToString().Trim().ToLower() == "true")
            {
                model.IsPremierOwner = true;
            }

            if ((model.IsTravelerPlusEmployee ||
                 (HttpContext.Session["IsTravelerPlusOwner"] != null && HttpContext.Session["IsTravelerPlusOwner"].ToString() == "TRUE") ||
                 (HttpContext.Session["IsTravelerPlusEligible"] != null && HttpContext.Session["IsTravelerPlusEligible"].ToString() == "TRUE")) && model.ContractType == "Vacation Club")
            {
                model.NavigatorType = "Travelerplus";
            }

            if (Session["PendingOwner"] != null && Session["PendingOwner"].ToString() == "TRUE")
            {
                model.NavigatorType           = "Pending";
                model.TravelerPlusGoesNowhere = true;
            }

            if (Session["siteNavjs"] != null && Session["siteNavjs"].ToString() == "ownerNVC_data")
            {
                model.NavigatorType = "Fixed";
            }
            if (model.HomeProject != null)
            {
                if (model.HomeProject == "52")
                {
                    model.NavigatorType = "Sampler24";
                }
            }
        }