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)); }
private void loadGrids() { //Dim conn As IDbConnection = New iDB2Connection //conn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("BxgCorp.Owner.Reservation.ConnectionString") BGO.OwnerWS.Owner BXGOwner = new BGO.OwnerWS.Owner(); BGO.OwnerWS.OwnerWS1SoapClient OwnerService = new BGO.OwnerWS.OwnerWS1SoapClient(); System.DateTime dtm = DateTime.Now.Date; string _d = dtm.Day.ToString(); string _m = dtm.Month.ToString(); if (_d.Length < 2) { _d = "0" + _d; } if (_m.Length < 2) { _m = "0" + _m; } string s = dtm.Year.ToString().Substring(2, 2) + _m + _d; try { if (ViewData["myPendingHistoryBind"] == null) { //TODO //this.lblMessages.Text = "There are no current reservations to display.<br />"; //this.rptPendingReservations.Visible = false; } else { //PopulateModelPendingHistory(ViewData["myPendingHistoryBind"]); //this.rptPendingReservations.DataSource = GetPendingHistoryViewState(); //this.rptPendingReservations.DataBind(); } //if (ViewState("myPastHistoryBind") == null) //{ // //this.lblMessages.Text = "There are no past reservations to display."; // //this.rptPastReservations.Visible = false; //} //else //{ // //this.rptPastReservations.DataSource = GetPastHistoryViewState(); // //this.rptPastReservations.DataBind(); //} } catch (Exception ex) { Response.Write("error loading grids: " + ex.Message + "<br />"); } finally { } }
public ActionResult GetPartialView() { //mCreditCardModel = new CreditCardInfoModel() //TODO: Web Service populate of Owner BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; CreditCardInfoModel model = new CreditCardInfoModel(); HydrateModel(model); TempData["CCFormRequestFromMyPoints"] = CurrentPage.Id == Convert.ToInt32(ConfigurationManager.AppSettings["myPointsContentId"]); return(PartialView("CreditCardInfo", model)); }
private bool HasOwnerAccountTypeAU(BGO.OwnerWS.Owner bxgOwner) { foreach (var maintenanceFee in bxgOwner.maintFees) { if (maintenanceFee.saleType == "A" || maintenanceFee.saleType == "U") { return(true); } } return(false); }
private string GetSalesTypeCode(BGO.OwnerWS.Owner bxgOwner) { var contractType = (string)Session["OwnerContractType"]; bool isTravelerPlusEmployee = (string)Session["IsTravelerPlusEmployee"] == "TRUE"; bool isSamplerOwner = bxgOwner.User[0].isSampler; string homeProject = bxgOwner.User[0].HomeProject; bool NVC = false; string searchParameter = string.Empty; if (contractType == "Vacation Club" || contractType == "Sampler") { NVC = false; } else { NVC = true; } if (isTravelerPlusEmployee) { searchParameter = "TP"; } else if (NVC) { searchParameter = "NVC"; } else if (contractType == "Vacation Club") { if (HasOwnerAccountTypeAU(bxgOwner)) { searchParameter = "O1"; } else { searchParameter = "VC"; } } else if (isSamplerOwner) { if (homeProject == "52") { searchParameter = "SMP24"; } else if (homeProject == "51") { searchParameter = "VSMP"; } } return(searchParameter); }
private void IdentifyNavigatorType() { bxgOwner = (BGO.OwnerWS.Owner)HttpContext.Session["BXGOwner"]; if (bxgOwner.User[0].HomeProject != null) { if (bxgOwner.User[0].HomeProject == "52") { model.NavigatorType = "Sampler24"; } } model.ContractType = Session["OwnerContractType"].ToString(); 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 (model.IsFixedFlexOrTraditionalOwner || Session["siteNavjs"] != null && Session["siteNavjs"].ToString() == "ownerNVC_data") { model.NavigatorType = "Fixed"; } if ((Session["IsTravelerPlusEmployee"] != null && (Session["IsTravelerPlusEmployee"].ToString() == "TRUE") || (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"; } }
// Same as SubmitForm, but with the following changes so that we can use it with Ajax.BeginForm: // * Returns the partial view with the model instead of redirecting to the current page // * Populates the dropdown model properties so the rendere doesn't yell at us // * Deletes the DisplaySaveMyPoints TempData key if it exists, since SubmitForm relies on the My Points page deleting it public ActionResult SubmitAjaxForm(CreditCardInfoModel model) { if (TempData.ContainsKey("DisplaySaveMyPoints")) { TempData.Remove("DisplaySaveMyPoints"); } BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; mCreditCardModel = model; PopulateMonths(); PopulateYears(); PopulateCreditCardType(); PopulatePrice(); mCreditCardModel.CreditCardInfoErrors = new List <String>(); ValidateForm(mCreditCardModel); if (ModelState.IsValid) { //redirect to current page to clear the form SavePoints(); } else { TempData.Add("DisplaySaveMyPoints", true); //Add Error processing here } if (cardSuccess) { if (Session["CcformRedirectUrl"] != null) { ClearMessages(); } string path = (string)Session["CcformRedirectUrl"] ?? BGModern.HtmlExtensions.CustomHtmlHelpers.GetFullSitePath(null).ToString() + "/my-points"; Session["CcformRedirectUrl"] = null; return(Json(new{ url = path })); } else { return(PartialView("CreditCardInfo", model)); } }
public ActionResult SubmitForm(CreditCardInfoModel model) { BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; mCreditCardModel = model; mCreditCardModel.CreditCardInfoErrors = new List <String>(); ValidateForm(mCreditCardModel); if (ModelState.IsValid) { //redirect to current page to clear the form SavePoints(); return(RedirectToCurrentUmbracoPage()); } else { TempData.Add("DisplaySaveMyPoints", true); //Add Error processing here return(CurrentUmbracoPage()); } }
public ActionResult GetMyPointsList() { BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; MyPointsListModel mypoints = new MyPointsListModel(); if (BXGOwner.User[0].HomeProject == "51" || BXGOwner.User[0].HomeProject == "52") { mypoints.HideFuturePoints = true; } PopulateOwnerPointDetails(mypoints); PopulateOwnerPointTypes(mypoints); PopulateOwnerPointSummary(mypoints); //Default Sort mypoints.CurrentDetailPoints.OrderBy(x => x.PointTypeDesc); Response.Redirect(ConfigurationManager.AppSettings["bxgwebSitecoremyPointsRedirectUrl"], true); return(PartialView("PointsList", mypoints)); }
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 void PopulateReservationInfo(MyReservationsDetailsModel detailsModel) { BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; BGO.ResortsService.ReservationHistory history = new BGO.ResortsService.ReservationHistory(); BGO.ResortsService.ReservationHistoryList historyResult = new BGO.ResortsService.ReservationHistoryList(); BGO.ResortsService.ResortsServiceClient reservationAS400 = new BGO.ResortsService.ResortsServiceClient(); BGO.ResortsService.ReservationHistoryItem[] histories = null; BGO.ResortsService.OwnerID owner = new BGO.ResortsService.OwnerID(); try { history.OwnerID = null; owner.OwnerVacationNumber = BXGOwner.Arvact; history.OwnerID = owner; history.SiteName = BGO.ResortsService.Sites.OnlinePoints; history.EffectiveDate = DateTime.Now; history.SearchHistoryBy = BGO.ResortsService.ReservationHistoryType.Both; historyResult = reservationAS400.GetReservationsHistory(history); if (historyResult.Success) { histories = historyResult.ReservationHistoryItem; foreach (BGO.ResortsService.ReservationHistoryItem reservationItem in histories) { if (reservationItem._ReservationNumber == detailsModel.ReservationNo) { detailsModel.GuestName = reservationItem._GuestFullName; detailsModel.MaxOccupancy = reservationItem._MaximumOccupancy; detailsModel.ReservationType = reservationItem._ReservationType; detailsModel.NumberOfNights = Convert.ToInt32(reservationItem._NumberOfNights); detailsModel.NumberOfAdults = reservationItem._NumberOfAdults; detailsModel.PolicyStatus = reservationItem._PolicyStatus; detailsModel.ConfirmationDate = Convert.ToDateTime(reservationItem._DateConfirmed).ToString(); detailsModel.CheckIn = Convert.ToDateTime(reservationItem._CheckInDate).ToString(); //detailsModel.ConfirmationDate = String.Format("{0:M/d/yyyy}", Convert.ToDateTime(reservationItem._DateConfirmed)); //detailsModel.CheckIn = String.Format("{0:M/d/yyyy}", Convert.ToDateTime(reservationItem._CheckInDate)); //detailsModel.CheckOut = reservationItem. TODO: WHERE DOES THIS COME FROM detailsModel.Amount = Convert.ToDouble(reservationItem._Amount); //TO DO: IS THIS hfAmount????????? if (detailsModel.ReservationType == "PSE") { detailsModel.ResortNo = "85"; } if (reservationItem._Points == "") { detailsModel.Points = "0"; } else { detailsModel.Points = String.Format("{0:#,###}", reservationItem._Points.Trim()); } //Tax calculations are used for points double tax = Convert.ToDouble(Utilities.getResortInfo(Convert.ToInt32(reservationItem._ProjectStay)).TaxRate); if (detailsModel.NumberOfNights == 1) { detailsModel.NumberOfNights = 2; } tax = tax * Convert.ToDouble(detailsModel.Amount / detailsModel.NumberOfNights); //The tax charge daily tax = Math.Round(tax, 2, MidpointRounding.AwayFromZero); //Round up tax charge to a penny. double total = tax * detailsModel.NumberOfNights + detailsModel.Amount; if (detailsModel.ReservationType == "Bonus Time") { detailsModel.PayType = "Amount:"; detailsModel.Points = String.Format("{0:c}", total); //TODO: locate difference between Me.controls and controls. Just means this instance right??? detailsModel.Points = detailsModel.Amount.ToString(); } else if (detailsModel.ReservationType == "Flex") { detailsModel.PayType = "Nights:"; detailsModel.Points = detailsModel.NumberOfNights.ToString(); } else { detailsModel.PayType = "Points:"; } //TODO: Get Villa Description and Handicap accessible, checkout } } } if (reservationAS400.State != System.ServiceModel.CommunicationState.Faulted) { reservationAS400.Close(); } } catch (Exception ex) { if (reservationAS400.State != System.ServiceModel.CommunicationState.Faulted) { reservationAS400.Close(); } StringBuilder errMsg = new StringBuilder(); errMsg.Append("Error happened fetching Reservations List"); errMsg.Append(ex.Message); sendMail.sendMessage("*****@*****.**", "", "Exception Error - Getting Reservation List", errMsg); } //BGO.ResortsService.ReservationHistoryItem = }
// // GET: /Home/ public ActionResult Home() { if (Session["BXGOwner"] == null) { if (Session["_path_info"] != null) { Session["_path_info"] = Request.RawUrl; } Response.Redirect(ConfigurationManager.AppSettings["bxgwebUnsecureURL"] + "default.aspx?sess=timeout", true); } // Fixed/Flex users have a different home page var isFixedFlexOrTraditionalOwner = Session["IsFixedFlexOrTraditionalOwner"]; string referrer = string.Empty; if (System.Web.HttpContext.Current.Request.UrlReferrer != null) { if (System.Web.HttpContext.Current.Request.UrlReferrer.AbsoluteUri != null) { referrer = System.Web.HttpContext.Current.Request.UrlReferrer.AbsoluteUri; } } if (isFixedFlexOrTraditionalOwner is bool && (bool)isFixedFlexOrTraditionalOwner) { OurResortsModel ourResorts = null; bool vacationClubOwner = false; bool vacationClubOrSampler = false; int ourResortsContentId; IPublishedContent resortContent = null; string ourResortsContentIdString = ConfigurationManager.AppSettings["ourResortsContentId"]; if (!string.IsNullOrWhiteSpace(ourResortsContentIdString) && Int32.TryParse(ourResortsContentIdString, out ourResortsContentId)) { resortContent = Umbraco.TypedContent(ourResortsContentId); ourResorts = OurResortsMapper.Map(resortContent); ourResorts.VacationClubOwner = vacationClubOwner; ourResorts.VacationClubOrSamplerOwner = vacationClubOrSampler; ourResorts.PagerModel = null; } var children = resortContent.Children; var homeResortId = Session["OwnerHomeResort"]; if (homeResortId != null) { children = children.Where(x => x.GetPropertyValue <string>("databaseid") == (string)homeResortId); } foreach (IPublishedContent child in children) { ResortModel resort = ResortMapper.Map(child); resort.IncludeBorderLine = true; resort.IncludePhone = true; if (resort != null) { if (resort.Name != null) { resort.Name = resort.Name.ToUpper(); } ourResorts.OurResorts.Add(resort); } } if (AllowLegacySearch(referrer)) { Response.Redirect(HomePageRedirect, true); } return(View("HomeFixed", ourResorts)); } else { HomeModel model = new HomeModel(); //Logic for checking side navigation visibility BGO.OwnerWS.Owner BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; model.VacationClubOwner = false; if (Session["OwnerContractType"] != null && (Session["OwnerContractType"].ToString() == "Vacation Club" || Session["OwnerContractType"].ToString() == "Sampler")) { if (BXGOwner != null && BXGOwner.User != null && !BXGOwner.User[0].isSampler && Session["OwnerContractType"].ToString() != "Sampler") { model.VacationClubOwner = true; } } if (Session["BGModernSessionVariablesAreSet"] == null) { Global.SetSessionVariablesForBGModern(); } if (AllowLegacySearch(referrer)) { Response.Redirect(HomePageRedirect, true); } return(View(model)); } }
public ActionResult ViewPPP(string reservationNo, string resortNo) { BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; BGO.ResortsService.OwnerID owner = new BGO.ResortsService.OwnerID(); //searching for the clicked reservation item so that the session can be set for the next page. BGO.ResortsService.ReservationHistory history = new BGO.ResortsService.ReservationHistory(); BGO.ResortsService.ReservationHistoryList historyResult = new BGO.ResortsService.ReservationHistoryList(); BGO.ResortsService.ResortsServiceClient reservationAS400 = new BGO.ResortsService.ResortsServiceClient(); BGO.ResortsService.ReservationHistoryItem[] histories = null; history.OwnerID = null; owner.OwnerVacationNumber = BXGOwner.Arvact; history.OwnerID = owner; history.SiteName = BGO.ResortsService.Sites.OnlinePoints; history.EffectiveDate = DateTime.Now; history.SearchHistoryBy = BGO.ResortsService.ReservationHistoryType.Future; historyResult = reservationAS400.GetReservationsHistory(history); if (historyResult.Success) { histories = historyResult.ReservationHistoryItem; foreach (BGO.ResortsService.ReservationHistoryItem reservationItem in histories) { if (reservationItem._ReservationNumber == reservationNo) { Session["ReservationSelected4Details"] = reservationItem; } } } ResortInfo resortInfo = Utilities.getResortInfo(Convert.ToInt32(resortNo)); dynamic ourResorts = null; int ourResortsContentId; string ourResortsContentIdString = ConfigurationManager.AppSettings["ourResortsContentId"]; if (!string.IsNullOrWhiteSpace(ourResortsContentIdString) && Int32.TryParse(ourResortsContentIdString, out ourResortsContentId)) { ourResorts = Umbraco.TypedContent(ourResortsContentId); } //Populate the image based on the resorts. if (ourResorts != null) { foreach (IPublishedContent content in ourResorts.Children) { if (content.DocumentTypeAlias.Equals("Resort")) { if (resortInfo.ResortID == content.GetPropertyValue <string>("DatabaseId")) { Session["ReservResortImage"] = content.GetPropertyValue <string>("ResortImage"); Session["ReservResortUrl"] = content.Url; } } } } Session["BuyPPPResortNo"] = resortNo; Session["resortcity"] = String.Concat(resortInfo.City, ", ", resortInfo.State, " ", resortInfo.PostalCode); string path = BGModern.HtmlExtensions.CustomHtmlHelpers.GetParentSitePath(null).ToString(); string pppUrl = string.Concat(path, "/owner/ptsPurchaseppp.aspx?Origin=myreservation&resno=", reservationNo + "&ResortNo=" + Session["BuyPPPResortNo"]); return(Redirect(pppUrl)); }
private void HandleRedirects(SignIn model) { //Get the HTTP_HOST AND HTTP_REFERER string sHost = Request.ServerVariables["HTTP_HOST"].ToLower().Replace("www.", ""); string sHostTP = (Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["PATH_INFO"]).ToLower().Replace("www.", ""); sReferrer = Request.ServerVariables["HTTP_REFERER"] + ""; string sRedirectURL = null; bxgOwner = (BGO.OwnerWS.Owner)Session["BXGOwnerMedallia"]; string ownerContractType = (string)Session["OwnerContractType"]; Session.Clear(); Session["BXGOwnerMedallia"] = bxgOwner; Session["OwnerContractType"] = ownerContractType; if (ConfigurationFactory.LogLoginProcess) { BXGDiagnostics.EventLogging objLogging = new BXGDiagnostics.EventLogging("BlueGreenOnline", "LoginProcess"); objLogging.LogEvent("Host: " + sHost + "HostTP: " + sHostTP + " Refferrer: " + sReferrer, System.Diagnostics.EventLogEntryType.Information, true); objLogging.LogEvent("sHostTP.ToLower().IndexOf(encorerewards): " + sHostTP.ToLower().IndexOf("encorerewards"), System.Diagnostics.EventLogEntryType.Information, true); objLogging = null; } if (sReferrer.IndexOf(sHost) == -1) { //Are we a traveler plus login? if ((sHostTP.ToLower().IndexOf("travelerplus") > 0)) { model.IsTravelerPlusLogin = "******"; //imgLogo.ImageUrl = "TravelerPlus/owner/images/bgtp_logo_lrg.gif" //Are we a encore rewards login? } else if ((sHostTP.ToLower().IndexOf("encorerewards") >= 0)) { model.IsEncoreRewardsLogin = "******"; //imgLogo.ImageUrl = "images/e_logo.gif" } else { //If we came from somewhere else then check our redirect list clsDBConnectivity dbCon = new clsDBConnectivity(); if (dbCon.dbCmnd != null) { dbCon.dbCmnd.CommandText = "uspCheckForRedirection"; dbCon.dbCmnd.CommandType = System.Data.CommandType.StoredProcedure; dbCon.dbCmnd.Parameters.Clear(); //dbCon.dbCmnd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@URL", System.Data.SqlDbType.VarChar, 50)).Value = sHost; //sRedirectURL = dbCon.dbCmnd.ExecuteScalar(); //dbCon.Close(); dbCon = null; } //We found a redirect page, so lets go there if (sRedirectURL != null) { Response.Redirect(sRedirectURL, true); } } } }
private void OriginalCall(SignIn model) { /************************************************************** * LoginUtils.VacationsRedirect(Request.Url.Host.ToLower()); *************************************************************/ if (Request.Url.Host.ToLower() == "dev.bluegreenonline.com") { Response.Redirect("http://mdev.bluegreenvacations.com/"); } else if (Request.Url.Host.ToLower() == "stg.bluegreenonline.com") { Response.Redirect("http://stg.bluegreenvacations.com/"); } else if (Request.Url.Host.ToLower() == "bluegreenonline.com" | Request.Url.Host.ToLower() == "www.bluegreenonline.com") { Response.Redirect("http://www.bluegreenvacations.com/"); } // (LoginUtils.IsBgvfsReferrer(referrer) if (Request.Url.ToString().ToLower().Contains("signoff=true")) { // BlueGreenContext.DigestRequest() if (Request.Cookies["OwnerInfo"] != null) { model.OwnerId = Request.Cookies["OwnerInfo"]["OwnerId"]; model.OwnerType = Request.Cookies["OwnerInfo"]["OwnerType"]; model.TPStatus = Request.Cookies["OwnerInfo"]["TPStatus"]; } // BlueGreenContext.DigestRequest(); System.Web.Security.FormsAuthentication.SignOut(); foreach (string cookie in Request.Cookies.AllKeys) { Request.Cookies.Remove(cookie); } bxgOwner = (BGO.OwnerWS.Owner)Session["BXGOwnerMedallia"]; // BlueGreenContext.DigestRequest() if ((bxgOwner != null)) { HasOwnerInformation = true; model.OwnerId = bxgOwner.Arvact; if (bxgOwner.User[0].isSampler) { model.OwnerType = "SAMPLER"; } else { if ((string)Session["OwnerContractType"] == "Vacation Club") { model.OwnerType = "VACCLUB"; } else { model.OwnerType = "TRADITIONAL"; } } if (bxgOwner.TravelerPlusMembership.IsTravelerPlusEligible) { if (bxgOwner.TravelerPlusMembership.AccountExpired) { model.TPStatus = "EXPIRED"; } else { model.TPStatus = "ACTIVE"; } } else { model.TPStatus = "NOTELIGIBLE"; } } } // this.SetPostData() string tutorialRedirect = (string)Session["ReferrerURL"]; if (tutorialRedirect != null) { if (tutorialRedirect.Contains("/tutorials/default.aspx")) { model.IsTutorialTransfer = "True"; } } //Check for user redirected for login. Assign the path info to //a variable to re-assign to session variable in case of session values cleared //If Session("_path_info") <> "" Then // path_info = Session("_path_info") //End If if (!string.IsNullOrEmpty(Request.QueryString["ReturnUrl"])) { path_info = Request.QueryString["ReturnUrl"]; path_info = path_info.Replace("%2f", "/"); } model.sMessage = ""; model.IsTravelerPlusLogin = ""; model.IsEncoreRewardsLogin = ""; //Sales users that are logged in go to the sales login page if ((string)Session["SalesUser"] == "BLUEGREEN") { Response.Redirect("SalesLogin.aspx", true); } HandleRedirects(model); string email_id = null; string pass = null; email_id = (string)Session["email_id"]; pass = (string)Session["password"]; //Allow Owner support agents to login as the owner from their application if (!string.IsNullOrEmpty(Request.Form["AgentID"])) { string sURL = Request.ServerVariables["HTTP_REFERER"] + ""; if (Request.Form["AgentID"] == "SALESKIOSK" & sURL.ToLower().IndexOf("saleskiosk") > -1) { email_id = "*****@*****.**"; pass = "******"; } else if (Request.Form["AgentID"] == "SALESKIOSKVC" & sURL.ToLower().IndexOf("saleskioskvc") > -1) { email_id = "*****@*****.**"; pass = "******"; } else { email_id = Request.Form["AgentLoginEmail"]; pass = Request.Form["AgentLoginPassword"]; } model.AgentLoginID = Request.Form["AgentID"]; } sEmail = ""; sPass = ""; bxgOwner = (BGO.OwnerWS.Owner)Session["BXGOwnerMedallia"]; string ownerContractType = (string)Session["OwnerContractType"]; Session.Clear(); Session["BXGOwnerMedallia"] = bxgOwner; Session["OwnerContractType"] = ownerContractType; //re-assign path info to session variable Session["_path_info"] = path_info; if (!IsPostBack) { try { //Allow logins from elsewhere to feed into this page if (!string.IsNullOrEmpty(email_id) & !string.IsNullOrEmpty(pass)) { sEmail = email_id; sPass = pass; } } catch { } } //Display message for session timeouts if (Request.QueryString["sess"] == "timeout") { model.sMessage = UiUtils.BuildMessage("Either you are requesting a page that requires sign in for access, or your previous Bluegreen Online session timed out after 20 minutes of inactivity. Please sign in below."); } //Display message for blocked accounts if (Request.QueryString["acctstat"] == "block") { model.sMessage = UiUtils.BuildMessage("Your account does not qualify for online access at this time. <BR>Please contact us at 800.456.CLUB(2582) and select option 2 to learn how to enable your account."); } if (!string.IsNullOrEmpty(Request.QueryString["ErrMessage"])) { model.sMessage = UiUtils.BuildMessage("Oasis Lakes owners: <font color='#000000'>The association news page has moved. To access it, please sign in below and click on the picture of The Fountains/Oasis Lakes clubhouse at the top of the home page. Then click on the <strong style='font-size:8pt'>Association Owners</strong> link on the left side of the Resort Detail page. If you have not yet enrolled in Bluegreen Online, click on the <strong style='font-size:8pt'>Not registered?</strong> link to do so.</font>"); } //Display an error at the top of the login page if the Login was unsuccessful if (Request.QueryString["error"] == "NoConn") { model.sMessage = UiUtils.BuildMessage("We have encountered an unexpected error. Please wait a few minutes and try to log in again. We apologize for the inconvenience."); } if (Request.QueryString["lo"] == "1" | Request.QueryString["error"] == "NoACK") { Session.Clear(); Session.Abandon(); Session.RemoveAll(); if (Request.Cookies["ASP.NET_SessionId"] != null) { Response.Cookies["ASP.NET_SessionId"].Value = string.Empty; Response.Cookies["ASP.NET_SessionId"].Expires = DateTime.Now.AddMonths(-20); } } }
public ActionResult OurResorts(OurResortsModel resorts) { ValidateSession(); if (Request.QueryString["ResortID"] != null) { dynamic resortsContent = null; int ourResortsContentId; string ourResortsContentIdString = ConfigurationManager.AppSettings["ourResortsContentId"]; if (!string.IsNullOrWhiteSpace(ourResortsContentIdString) && Int32.TryParse(ourResortsContentIdString, out ourResortsContentId)) { resortsContent = Umbraco.TypedContent(ourResortsContentId); } //Populate the image based on the resorts. if (resortsContent != null) { string resortId = Request.QueryString["ResortId"]; foreach (IPublishedContent content in resortsContent.Children) { if (content.DocumentTypeAlias.Equals("Resort")) { if (resortId == content.GetPropertyValue <string>("DatabaseId")) { string path = BGModern.HtmlExtensions.CustomHtmlHelpers.GetParentSitePath(null).ToString(); return(Redirect(path + content.Url)); } } } } } //Logic for checking side navigation visibility BGO.OwnerWS.Owner BXGOwner = (BGO.OwnerWS.Owner)Session["BXGOwner"]; bool vacationClubOwner = false; bool vacationClubOrSampler = false; if (Session["OwnerContractType"] != null && (Session["OwnerContractType"].ToString() == "Vacation Club" || Session["OwnerContractType"].ToString() == "Sampler")) { vacationClubOrSampler = true; if (BXGOwner != null && BXGOwner.User != null && !BXGOwner.User[0].isSampler && Session["OwnerContractType"].ToString() != "Sampler") { vacationClubOwner = true; } } Boolean showAll = false; int pageNumber = 1; OurResortsModel ourResorts = null; if (resorts == null || resorts.Page == 0) { pageNumber = 1; } else { if (resorts.Page == -1) { showAll = true; } else { pageNumber = resorts.Page; } } if (showAll) { ourResorts = OurResortsMapper.Map(CurrentPage); ourResorts.VacationClubOwner = vacationClubOwner; ourResorts.VacationClubOrSamplerOwner = vacationClubOrSampler; ourResorts.PagerModel = null; var children = CurrentPage.Children; if (!string.IsNullOrWhiteSpace(resorts.FilterCity) && !string.IsNullOrWhiteSpace(resorts.FilterState)) { resorts.FilterCity = resorts.FilterCity.ToUpper(); resorts.FilterState = resorts.FilterState.ToUpper(); children = children.Where(x => x.GetPropertyValue <string>("city").Trim().ToUpper() == resorts.FilterCity && x.GetPropertyValue <string>("state").Trim().ToUpper() == resorts.FilterState); ourResorts.FilterCity = resorts.FilterCity; ourResorts.FilterState = resorts.FilterState; } if (!string.IsNullOrWhiteSpace(resorts.FilterExperience)) { var experienceList = resorts.FilterExperience.Split(','); children = children.Where(x => x.GetPropertyValue <string>("experience") != null && x.GetPropertyValue <string>("experience") .Split(',') .Intersect(experienceList) .Any()); ourResorts.FilterExperience = resorts.FilterExperience; } foreach (IPublishedContent child in children) { ResortModel resort = ResortMapper.Map(child); if (resort != null) { ourResorts.OurResorts.Add(resort); } } } else { ourResorts = OurResortsMapper.MapWithPaging(CurrentPage, pageNumber, resorts.FilterCity, resorts.FilterState, resorts.FilterExperience); ourResorts.VacationClubOwner = vacationClubOwner; ourResorts.VacationClubOrSamplerOwner = vacationClubOrSampler; if (ourResorts.ResortCount == 1 && ((resorts.FilterCity != null && resorts.FilterState != null) || resorts.FilterExperience != null)) { string url = ourResorts.OurResorts[0].Url; string path = BGModern.HtmlExtensions.CustomHtmlHelpers.GetParentSitePath(null).ToString(); return(Redirect(path + url)); } } string CurrentURL = Request.CurrentExecutionFilePath; if (CurrentURL == "/BGModern/our-resorts") { Response.Redirect(ConfigurationManager.AppSettings["OurResortsToSiteCore"], true); } // return a view return(View("OurResorts", ourResorts)); }