protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser() || (Request.QueryString.AllKeys.Contains("asMob") && Request.QueryString["asMob"] == "true")) { Page.Header.Controls.Add(new LiteralControl(MobileStyles)); } else { Page.Header.Controls.Add(new LiteralControl(LandingStyles)); } ltlCompatabilityWarning.Text = Request.CompatabilityWarning(); if (!Page.IsPostBack) { Int32 localEmployerID = Request.EmployerID <Int32>(); if (localEmployerID > 0) { using (GetEmployerContent gec = new GetEmployerContent()) { gec.EmployerID = localEmployerID; gec.GetFrontEndData(); if (!gec.HasErrors && gec.Tables.Count > 0 && gec.Tables[0].Rows.Count > 0) { loginregister.Visible = gec.CanSignIn; imgLogo.ImageUrl = ResolveUrl("~/images/" + gec.LogoImageName); imgLogo.Visible = (gec.LogoImageName != String.Empty); ltlAltID.Text = String.Format(ltlAltID.Text, gec.InsurerName); if (!gec.SSNOnly) { ltlAltID.Visible = (gec.InsurerName != String.Empty); } if (gec.SSNOnly) { cvSSNorID.ErrorMessage = cvSSNorID.ToolTip = "Please enter a valid number for your SSN."; } else { cvSSNorID.ErrorMessage = String.Format(cvSSNorID.ErrorMessage, " or " + gec.InsurerName + " ID."); } pnlAdditionalID.Visible = !gec.SSNOnly; hfEmployerIDFromURL.Value = gec.Tables[0].Rows[0]["EmployerName"].ToString(); //ltlUnavailable.Text = String.Format(ltlUnavailable.Text, // gec.InsurerName, gec.Tables[0].Rows[0]["EmployerName"].ToString()); ltlUnavailable.Text = string.Format(ltlUnavailable.Text, gec.FormattedPhoneNumber); lblNotFound.Text = String.Format(lblNotFound.Text, gec.PhoneNumber); cvAGE.ErrorMessage = String.Format(cvAGE.ErrorMessage, StandardizedPhoneNumber(gec.PhoneNumber), gec.EmployerName + "@clearcosthealth.com"); } } } HoldUser = string.Empty; if (Request.IsTimeout()) { ltlFailure.Text = "You've arrived on this page because your previous attempt at registering timed out due to inactivity.<br />Please begin again."; ltlFailure.Visible = true; } } }
protected void LoadEmployerContent() { using (GetEmployerContent gec = new GetEmployerContent(int.Parse(ThisSession.EmployerID))) { gec.PutInSession(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { using (GetEmployerContent gec = new GetEmployerContent()) { if (null != Request.QueryString["e"]) { gec.EmployerID = Convert.ToInt32(Request.QueryString["e"]); } gec.GetFrontEndData(); if (!gec.HasErrors) { if (gec.Tables[0].Rows.Count > 0) { txtNameOfOrganization.Text = hfToAddress.Value = gec.Tables[0].Rows[0]["EmployerName"].ToString(); ltlPhone.Text = Regex.Replace(gec.PhoneNumber, @"(\d{3})(\d{3})(\d{4})", "$1-$2-$3"); hfToAddress.Value += "@clearcosthealth.com"; } else { hfToAddress.Value = "info"; ltlPhone.Text = "650-473-3950"; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { using (GetEmployerContent gec = new GetEmployerContent()) { if (null != Request.QueryString["e"]) gec.EmployerID = Convert.ToInt32(Request.QueryString["e"]); gec.GetFrontEndData(); if (!gec.HasErrors) { if (gec.Tables[0].Rows.Count > 0) { txtNameOfOrganization.Text = hfToAddress.Value = gec.Tables[0].Rows[0]["EmployerName"].ToString(); ltlPhone.Text = Regex.Replace(gec.PhoneNumber, @"(\d{3})(\d{3})(\d{4})", "$1-$2-$3"); hfToAddress.Value += "@clearcosthealth.com"; } else { hfToAddress.Value = "info"; ltlPhone.Text = "650-473-3950"; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser()) { Response.Redirect("https://mobile.clearcosthealth.com"); } if (Request.Browser.Browser.ToLower() == "ie" && (Request.Browser.MajorVersion == 6 || Request.Browser.MajorVersion == 7)) { ltlCompatabilityWarning.Text = "<center><div class=\"compatWarn\">It appears you are using Internet Explorer " + Request.Browser.MajorVersion + ". We do not actively support this older browser.<br />We suggest you upgrade your browser for the best experience using ClearCost Health.</div></center>"; } if (!Page.IsPostBack) { if (null != Request.QueryString["e"]) { using (GetEmployerContent gec = new GetEmployerContent(Convert.ToInt32(Request.QueryString["e"]))) { if (!gec.HasErrors) { imgLogo.ImageUrl = "../Images/" + gec.LogoImageName; imgLogo.Visible = (gec.LogoImageName != String.Empty); loginregister.Visible = ltlDisclamer.Visible = (gec.CanSignIn || gec.CanRegister); ltlBreaker.Visible = (gec.CanSignIn && gec.CanRegister); pnlSignIn.Visible = gec.CanSignIn; pnlRegister.Visible = pnlRegNow.Visible = pnlRegNow2.Visible = gec.CanRegister; if (ltlDisclamer.Visible) { ltlDisclamer.Text = String.Format(ltlDisclamer.Text, gec.InsurerName, gec.Tables[0].Rows[0]["EmployerName"].ToString()); } if (!gec.CanRegister && !gec.CanSignIn) { pnlSignInNow.Visible = pnlRegNow.Visible = false; } else if (gec.CanRegister && !gec.CanSignIn) { pnlSignInNow.Visible = false; pnlRegNow.Visible = true; } else if (gec.CanRegister && gec.CanSignIn) { pnlRegNow.Visible = pnlSignInNow.Visible = false; if (gec.OverrideRegisterButton) { pnlSignIn.CssClass += " centric"; pnlSignInNow.Visible = true; } else { pnlRegister.CssClass += " centric"; pnlRegNow.Visible = true; } } } } } } }
private void loadEmployerContent() { using (GetEmployerContent gec = new GetEmployerContent()) { gec.EmployerID = Convert.ToInt32(ThisSession.EmployerID); gec.GetFrontEndData(); lblStartingText.Text = gec.SCIQStartText; ltlPhoneLM.Text = ltlPhoneQ.Text = gec.FormattedPhoneNumber; ltlEmployerName.Text = gec.EmployerName.Trim(); } }
private void loadEmployerContent() { using (GetEmployerContent gec = new GetEmployerContent()) { gec.EmployerID = Convert.ToInt32(ThisSession.EmployerID); gec.GetFrontEndData(); userGoal.Text = gec.SCUserGoalToHit; startText.Text = gec.SCDashboardStartText; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser()) { Response.Redirect("https://mobile.clearcosthealth.com"); } if (Request.Browser.Browser.ToLower() == "ie" && (Request.Browser.MajorVersion == 6 || Request.Browser.MajorVersion == 7)) ltlCompatabilityWarning.Text = "<center><div class=\"compatWarn\">It appears you are using Internet Explorer " + Request.Browser.MajorVersion + ". We do not actively support this older browser.<br />We suggest you upgrade your browser for the best experience using ClearCost Health.</div></center>"; if (!Page.IsPostBack) { if (null != Request.QueryString["e"]) { using (GetEmployerContent gec = new GetEmployerContent(Convert.ToInt32(Request.QueryString["e"]))) { if (!gec.HasErrors) { imgLogo.ImageUrl = "../Images/" + gec.LogoImageName; imgLogo.Visible = (gec.LogoImageName != String.Empty); loginregister.Visible = ltlDisclamer.Visible = (gec.CanSignIn || gec.CanRegister); ltlBreaker.Visible = (gec.CanSignIn && gec.CanRegister); pnlSignIn.Visible = gec.CanSignIn; pnlRegister.Visible = pnlRegNow.Visible = pnlRegNow2.Visible = gec.CanRegister; if (ltlDisclamer.Visible) ltlDisclamer.Text = String.Format(ltlDisclamer.Text, gec.InsurerName, gec.Tables[0].Rows[0]["EmployerName"].ToString()); if (!gec.CanRegister && !gec.CanSignIn) pnlSignInNow.Visible = pnlRegNow.Visible = false; else if (gec.CanRegister && !gec.CanSignIn) { pnlSignInNow.Visible = false; pnlRegNow.Visible = true; } else if (gec.CanRegister && gec.CanSignIn) { pnlRegNow.Visible = pnlSignInNow.Visible = false; if (gec.OverrideRegisterButton) { pnlSignIn.CssClass += " centric"; pnlSignInNow.Visible = true; } else { pnlRegister.CssClass += " centric"; pnlRegNow.Visible = true; } } } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { String employerFormat = String.Empty; using (GetEmployerContent gecs = new GetEmployerContent(Convert.ToInt16(Request.QueryString["e"]))) { this.InsurerName = gecs.InsurerName; employerFormat = gecs.MemberIDFormat; } String leftOver = employerFormat; //Int32 tbCount = 0; PageData = new List <BindData>(); while (leftOver.Length > 0) { BindData newBd = new BindData() { Length = 0 }; foreach (char c in leftOver.ToCharArray()) { if (c == DigitIndicator || c == LetterIndicator || c == EitherIndicator) { newBd.Text += "X"; newBd.Alt += "X"; newBd.Length++; newBd.ToolTip = newBd.Length + " character(s)"; } else { break; } } newBd.Style = String.Format("width:{0}px;padding:10px 15px;margin:10px 0px;", newBd.Length * 11); leftOver = leftOver.Remove(0, newBd.Length); if (leftOver.Length > 0) { leftOver = leftOver.Remove(0, 1); } PageData.Add(newBd); } rptFields.DataBind(PageData); } }
private void SetupShortSearch() { pnlLongSearch.Visible = false; pnlShortSearch.Visible = true; try { QueryStringEncryption qse = new QueryStringEncryption( Encoder.HtmlEncode(Request.QueryString["srch"].ToString()), (Guid)Membership.GetUser().ProviderUserKey); passedCCHID = qse["CCHID"]; passedEmployerID = qse["EmployerID"]; lblEmployerFromSrch.Text = String.Format("{0}", passedEmployerID); lblEmployeeIDFromSrch.Text = String.Format("{0}", passedCCHID); DataRow dr = (from employer in Employers.Tables[0].AsEnumerable() where employer.Field <int>("EmployerID") == int.Parse(passedEmployerID) select employer).FirstOrDefault(); ThisSession.CnxString = dr[2].ToString(); ThisSession.EmployerID = dr[0].ToString(); ThisSession.EmployerName = dr[1].ToString(); ThisSession.Insurer = dr[3].ToString(); ThisSession.RXProvider = dr[4].ToString(); ThisSession.ShowYourCostColumn = Convert.ToBoolean(dr[5].ToString()); using (GetEmployerContent gec = new GetEmployerContent(int.Parse(passedEmployerID))) gec.PutInSession(); Employee = new GetEmployeeByCCHIDForCallCenter(Convert.ToInt32(passedCCHID)); Employee.GetData(); if (!Employee.HasErrors) { gvUsers.DataSource = Employee.Employee; gvUsers.DataBind(); } else { SetupLongSearch(); } } catch (Exception ex) { SetupLongSearch(); ltlMessage.Text = "<div>" + ex.Message + "</div>"; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { using (GetEmployerContent gec = new GetEmployerContent()) { if (null != Request.QueryString["e"]) gec.EmployerID = Convert.ToInt32(Request.QueryString["e"]); gec.GetFrontEndData(); if (!gec.HasErrors) { imgLogo.ImageUrl = "../images/" + gec.LogoImageName; imgLogo.Visible = (gec.LogoImageName != String.Empty); StarbucksSignIn.Visible = gec.CanSignIn; if (!StarbucksSignIn.Visible) lbtnRegister.Visible = gec.CanRegister; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { String employerFormat = String.Empty; using (GetEmployerContent gecs = new GetEmployerContent(Convert.ToInt16(Request.QueryString["e"]))) { this.InsurerName = gecs.InsurerName; employerFormat = gecs.MemberIDFormat; } String leftOver = employerFormat; //Int32 tbCount = 0; PageData = new List<BindData>(); while (leftOver.Length > 0) { BindData newBd = new BindData() { Length = 0 }; foreach (char c in leftOver.ToCharArray()) { if (c == DigitIndicator || c == LetterIndicator || c == EitherIndicator) { newBd.Text += "X"; newBd.Alt += "X"; newBd.Length++; newBd.ToolTip = newBd.Length + " character(s)"; } else break; } newBd.Style = String.Format("width:{0}px;padding:10px 15px;margin:10px 0px;", newBd.Length * 11); leftOver = leftOver.Remove(0, newBd.Length); if (leftOver.Length > 0) { leftOver = leftOver.Remove(0, 1); } PageData.Add(newBd); } rptFields.DataBind(PageData); } }
/// <summary> /// Puts the relevant data into session from a DataSet object rather than storing the whole object in session /// </summary> /// <param name="info">The GetEmployerContent Object filled with data</param> /// <returns>True if successfull, False if there are errors or no data</returns> public static Boolean PutInSession(this GetEmployerContent info) { if (info.HasErrors) { return(false); } if (info.Tables.Count == 0) { return(false); } if (info.Tables[0].Rows.Count == 0) { return(false); } if (info.Tables.Count > 0 && info.Tables[0].Rows.Count > 0) { ThisSession.InsurerName = info.InsurerName; ThisSession.LogoImageName = info.LogoImageName; ThisSession.EmployerPhone = info.PhoneNumber; ThisSession.InternalLogo = info.InternalLogo; ThisSession.ContactText = info.ContactText; ThisSession.SpecialtyNetworkText = info.SpecialtyNetworkText; ThisSession.PastCareDisclaimerText = info.PastCareDisclaimerText; // lam, 20130418, MSF-299 ThisSession.RxResultDisclaimerText = info.RxResultDisclaimerText; // lam, 20130418, MSF-294 ThisSession.AllResult1DisclaimerText = info.AllResult1DisclaimerText; // lam, 20130425, MSF-295 ThisSession.AllResult2DisclaimerText = info.AllResult2DisclaimerText; // lam, 20130425, MSF-295 ThisSession.SpecialtyDrugDisclaimerText = info.SpecialtyDrugDisclaimerText; // lam, 20130429, CI-59 ThisSession.MentalHealthDisclaimerText = info.MentalHealthDisclaimerText; // lam, 20130508, CI-144 ThisSession.ServiceNotFoundDisclaimerText = info.ServiceNotFoundDisclaimerText; // lam, 20130604, MSF-377 ThisSession.DefaultYourCostOn = info.DefaultYourCostOn; ThisSession.DefaultSort = info.DefaultSort; ThisSession.AllowFairPriceSort = info.AllowFairPriceSort; // lam, 20130618, MSB-324 ThisSession.SavingsChoiceEnabled = info.SavingsChoiceEnabled; ThisSession.ShowSCIQTab = info.ShowSCIQTab; // lam, 20130816, SCIQ-77 } return(true); }
protected void ChooseEmployer(object sender, EventArgs e) { gvUsers.SelectedIndex = -1; gvUsers.DataSource = null; gvUsers.DataBind(); ddlEmployees.DataSource = null; ddlEmployees.DataBind(); lbConfirm.Enabled = false; lbConfirm.Visible = false; lbConfirm.Text = String.Empty; pnlLetters.Enabled = (ddlEmployers.SelectedItem.Text != "Select Employer"); DataRow dr = Employers.Tables[0].Rows[ddlEmployers.SelectedIndex - 1]; ThisSession.CnxString = dr[2].ToString(); ThisSession.EmployerID = dr[0].ToString(); ThisSession.EmployerName = dr[1].ToString(); ThisSession.Insurer = dr[3].ToString(); ThisSession.RXProvider = dr[4].ToString(); ThisSession.ShowYourCostColumn = Convert.ToBoolean(dr[5].ToString()); using (GetEmployerContent gec = new GetEmployerContent(int.Parse(ThisSession.EmployerID))) { gec.PutInSession(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { using (GetEmployerContent gec = new GetEmployerContent()) { if (null != Request.QueryString["e"]) { gec.EmployerID = Convert.ToInt32(Request.QueryString["e"]); } gec.GetFrontEndData(); if (!gec.HasErrors) { imgLogo.ImageUrl = "../images/" + gec.LogoImageName; imgLogo.Visible = (gec.LogoImageName != String.Empty); StarbucksSignIn.Visible = gec.CanSignIn; if (!StarbucksSignIn.Visible) { lbtnRegister.Visible = gec.CanRegister; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (null != Request.QueryString["e"]) { using (GetEmployerContent gec = new GetEmployerContent(Convert.ToInt32(Request.QueryString["e"]))) { if (!gec.HasErrors && gec.Tables[0].Rows.Count > 0) { tblVerify.FindControl("trMemberID").Visible = tblVerify.FindControl("trOR").Visible = !gec.SSNOnly; imgLogo.ImageUrl = ResolveUrl(String.Concat("~/Images/", gec.LogoImageName)); imgLogo.Visible = true; onlySSN = gec.SSNOnly; lblAndMemberID.Visible = !onlySSN; empID = Convert.ToInt32(Request.QueryString["e"]); sEmployerName = gec.EmployerName; } } } //if (Request.QueryString.Count > 0) //{ // EmailData eData; // if (Request.QueryString["e"] == null) // { // eData = DecryptInfo(Request.QueryString[0]); // } // else // { // eData = DecryptInfo(Request.QueryString["e"] != null); // } // if (eData.Expiration > DateTime.Now) // { // } //} } else { if (Request.Params["__EVENTTARGET"].ToString() == "SendEmail") { String encrypted = EncryptInfo(); string ToAddress = "*****@*****.**";// sUserName; string fromEmail = "*****@*****.**"; //(1) Create the MailMessage instance MailMessage mm = new MailMessage(fromEmail, ToAddress); //(2) Assign the MailMessage's properties mm.Subject = "Password Reset Link"; if (Request.QueryString["e"] != null) { mm.Body = Request.Url.ToString() + "&" + encrypted; } else { mm.Body = Request.Url.ToString() + encrypted; } mm.IsBodyHtml = true; //(3) Create the SmtpClient object SmtpClient smtp = new SmtpClient(); //(4) Send the MailMessage (will use the Web.config settings) //smtp.Send(mm); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser() || (Request.QueryString.AllKeys.Contains("asMob") && Request.QueryString["asMob"] == "true")) { Page.Header.Controls.Add(new LiteralControl(MobileStyles)); } else { Page.Header.Controls.Add(new LiteralControl(LandingStyles)); } if (Request.Browser.Browser.ToLower() == "ie" && (Request.Browser.MajorVersion == 6 || Request.Browser.MajorVersion == 7)) { ltlCompatabilityWarning.Text = "<center><div class=\"compatWarn\">It appears you are using Internet Explorer " + Request.Browser.MajorVersion + ". We do not actively support this older browser.<br />We suggest you upgrade your browser for the best experience using ClearCost Health.</div></center>"; } ScriptManager.RegisterStartupScript(cuwReview, cuwReview.GetType(), "BindThePage", "SetPage()", true); if (!Page.IsPostBack) { //If the page is not a post back if (Request.QueryString["e"] != null) { //If there is an employer tied to the 'e' query string parameter, process employer content using (GetEmployerContent gec = new GetEmployerContent(int.Parse(Request.QueryString["e"]))) { //Check the object and store session info as needed. if (gec.PutInSession()) { //If the data object was clean and had data continue to finish the page with the rest of the data Boolean LoginAvailable = gec.CanSignIn; NotificationsVisible = gec.HasNotificationSection; OtherMembersVisible = gec.HasOtherPeopleSection; loginregister.Visible = LoginAvailable; //Do everything required for the Create User Step using (Control create = cuwReview.CreateUserStep.ContentTemplateContainer) { using (Image i = (create.FindControl("imgLogo") as Image)) { i.ImageUrl = ResolveUrl(String.Concat("~/images/", ThisSession.LogoImageName)); i.Visible = !String.IsNullOrWhiteSpace(gec.LogoImageName); } (create.FindControl("pnlOtherMembers") as Panel).Visible = gec.HasOtherPeopleSection; (create.FindControl("pnlNotificationSettings") as Panel).Visible = gec.HasNotificationSection; (create.FindControl("pnlTCVisible") as Panel).Visible = gec.TandCVisible; (create.FindControl("pnlTCHidden") as Panel).Visible = !gec.TandCVisible; using (Repeater r = (create.FindControl("rptOtherMembers") as Repeater)) { if (ThisSession.Dependents == null || ThisSession.Dependents.Count == 0) { r.Visible = false; } else { r.DataSource = ThisSession.Dependents.AsDataTable(); r.DataBind(); } } } //Do everyting required for the Complete Step using (Control complete = cuwReview.CompleteStep.ContentTemplateContainer) { (complete.FindControl("imgLogo") as Image).ImageUrl = ThisSession.LogoImageName; (complete.FindControl("pnlStartSearching") as Panel).Visible = LoginAvailable; (complete.FindControl("ltlRegisterComplete") as Literal).Text = gec.CheckBackText; if (LoginAvailable) { using (Literal l = (complete.FindControl("ltlStartSearching") as Literal)) { l.Text = String.Format(l.Text, ResolveUrl("~/SavingsChoice/SavingsChoiceWelcome.aspx")); //l.Text = string.Format(l.Text, Page.ClientScript.GetPostBackClientHyperlink(cuwReview, "StartSearching")); } (complete.FindControl("ltlRegisterComplete") as Literal).Text = "You are now registered."; } } //Everything that is non-step related cuwReview.DisableCreatedUser = !LoginAvailable; cuwReview.LoginCreatedUser = LoginAvailable; //if (LoginAvailable) // cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />Please try logging in via the <a href=\"Sign_In.aspx\">Sign In</a> page.<br />If you've forgotten your password please click <a href=\"../../ResetPassword.aspx\">Forgot Password</a></div>"; //else // cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />You will be able to log in as soon as the new plan year begins.</div>"; if (LoginAvailable) { cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records indicate that this email address is associated with an account already.<br />Please try registering with a different email address or call us at " + ThisSession.EmployerPhone + " for assistance.<br />You can also try logging in via the <a href=\"Sign_In.aspx\">Sign In</a> page.<br />If you've forgotten your password please click <a href=\"../../ResetPassword.aspx\">Forgot Password</a></div>"; } else { cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />You will be able to log in as soon as the new plan year begins.</div>"; } } } } SetupPasswordQuestions(); SetupHearCCH(); // lam, 20130411, MSF-290 } }
protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser() || (Request.QueryString.AllKeys.Contains("asMob") && Request.QueryString["asMob"] == "true")) Page.Header.Controls.Add(new LiteralControl(MobileStyles)); else Page.Header.Controls.Add(new LiteralControl(LandingStyles)); ltlCompatabilityWarning.Text = Request.CompatabilityWarning(); if (!Page.IsPostBack) { Int32 localEmployerID = Request.EmployerID<Int32>(); if (localEmployerID > 0) { using (GetEmployerContent gec = new GetEmployerContent()) { gec.EmployerID = localEmployerID; gec.GetFrontEndData(); if (!gec.HasErrors && gec.Tables.Count > 0 && gec.Tables[0].Rows.Count > 0) { loginregister.Visible = gec.CanSignIn; imgLogo.ImageUrl = ResolveUrl("~/images/" + gec.LogoImageName); imgLogo.Visible = (gec.LogoImageName != String.Empty); ltlAltID.Text = String.Format(ltlAltID.Text, gec.InsurerName); if (!gec.SSNOnly) ltlAltID.Visible = (gec.InsurerName != String.Empty); if (gec.SSNOnly) cvSSNorID.ErrorMessage = cvSSNorID.ToolTip = "Please enter a valid number for your SSN."; else cvSSNorID.ErrorMessage = String.Format(cvSSNorID.ErrorMessage, " or " + gec.InsurerName + " ID."); pnlAdditionalID.Visible = !gec.SSNOnly; hfEmployerIDFromURL.Value = gec.Tables[0].Rows[0]["EmployerName"].ToString(); //ltlUnavailable.Text = String.Format(ltlUnavailable.Text, // gec.InsurerName, gec.Tables[0].Rows[0]["EmployerName"].ToString()); ltlUnavailable.Text = string.Format(ltlUnavailable.Text, gec.FormattedPhoneNumber); lblNotFound.Text = String.Format(lblNotFound.Text, gec.PhoneNumber); cvAGE.ErrorMessage = String.Format(cvAGE.ErrorMessage, StandardizedPhoneNumber(gec.PhoneNumber), gec.EmployerName + "@clearcosthealth.com"); } } } HoldUser = string.Empty; if (Request.IsTimeout()) { ltlFailure.Text = "You've arrived on this page because your previous attempt at registering timed out due to inactivity.<br />Please begin again."; ltlFailure.Visible = true; } } }
private void SetupShortSearch() { pnlLongSearch.Visible = false; pnlShortSearch.Visible = true; try { QueryStringEncryption qse = new QueryStringEncryption( Encoder.HtmlEncode(Request.QueryString["srch"].ToString()), (Guid)Membership.GetUser().ProviderUserKey); passedCCHID = qse["CCHID"]; passedEmployerID = qse["EmployerID"]; lblEmployerFromSrch.Text = String.Format("{0}", passedEmployerID); lblEmployeeIDFromSrch.Text = String.Format("{0}", passedCCHID); DataRow dr = (from employer in Employers.Tables[0].AsEnumerable() where employer.Field<int>("EmployerID") == int.Parse(passedEmployerID) select employer).FirstOrDefault(); ThisSession.CnxString = dr[2].ToString(); ThisSession.EmployerID = dr[0].ToString(); ThisSession.EmployerName = dr[1].ToString(); ThisSession.Insurer = dr[3].ToString(); ThisSession.RXProvider = dr[4].ToString(); ThisSession.ShowYourCostColumn = Convert.ToBoolean(dr[5].ToString()); using (GetEmployerContent gec = new GetEmployerContent(int.Parse(passedEmployerID))) gec.PutInSession(); Employee = new GetEmployeeByCCHIDForCallCenter(Convert.ToInt32(passedCCHID)); Employee.GetData(); if (!Employee.HasErrors) { gvUsers.DataSource = Employee.Employee; gvUsers.DataBind(); } else { SetupLongSearch(); } } catch (Exception ex) { SetupLongSearch(); ltlMessage.Text = "<div>" + ex.Message + "</div>"; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (null != Request.QueryString["e"]) { using (GetEmployerContent gec = new GetEmployerContent(Convert.ToInt32(Request.QueryString["e"]))) { if (!gec.HasErrors && gec.Tables[0].Rows.Count > 0) { tblVerify.FindControl("trMemberID").Visible = tblVerify.FindControl("trOR").Visible = !gec.SSNOnly; imgLogo.ImageUrl = ResolveUrl(String.Concat("~/Images/", gec.LogoImageName)); imgLogo.Visible = true; onlySSN = gec.SSNOnly; lblAndMemberID.Visible = !onlySSN; empID = Convert.ToInt32(Request.QueryString["e"]); sEmployerName = gec.EmployerName; } } } //if (Request.QueryString.Count > 0) //{ // EmailData eData; // if (Request.QueryString["e"] == null) // { // eData = DecryptInfo(Request.QueryString[0]); // } // else // { // eData = DecryptInfo(Request.QueryString["e"] != null); // } // if (eData.Expiration > DateTime.Now) // { // } //} } else { if (Request.Params["__EVENTTARGET"].ToString() == "SendEmail") { String encrypted = EncryptInfo(); string ToAddress = "*****@*****.**";// sUserName; string fromEmail = "*****@*****.**"; //(1) Create the MailMessage instance MailMessage mm = new MailMessage(fromEmail, ToAddress); //(2) Assign the MailMessage's properties mm.Subject = "Password Reset Link"; if (Request.QueryString["e"] != null) mm.Body = Request.Url.ToString() + "&" + encrypted; else mm.Body = Request.Url.ToString() + encrypted; mm.IsBodyHtml = true; //(3) Create the SmtpClient object SmtpClient smtp = new SmtpClient(); //(4) Send the MailMessage (will use the Web.config settings) //smtp.Send(mm); } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.IsMobileBrowser() || (Request.QueryString.AllKeys.Contains("asMob") && Request.QueryString["asMob"] == "true")) Page.Header.Controls.Add(new LiteralControl(MobileStyles)); else Page.Header.Controls.Add(new LiteralControl(LandingStyles)); if (Request.Browser.Browser.ToLower() == "ie" && (Request.Browser.MajorVersion == 6 || Request.Browser.MajorVersion == 7)) ltlCompatabilityWarning.Text = "<center><div class=\"compatWarn\">It appears you are using Internet Explorer " + Request.Browser.MajorVersion + ". We do not actively support this older browser.<br />We suggest you upgrade your browser for the best experience using ClearCost Health.</div></center>"; ScriptManager.RegisterStartupScript(cuwReview, cuwReview.GetType(), "BindThePage", "SetPage()", true); if (!Page.IsPostBack) { //If the page is not a post back if (Request.QueryString["e"] != null) { //If there is an employer tied to the 'e' query string parameter, process employer content using ( GetEmployerContent gec = new GetEmployerContent(int.Parse(Request.QueryString["e"]))) { //Check the object and store session info as needed. if (gec.PutInSession()) { //If the data object was clean and had data continue to finish the page with the rest of the data Boolean LoginAvailable = gec.CanSignIn; NotificationsVisible = gec.HasNotificationSection; OtherMembersVisible = gec.HasOtherPeopleSection; loginregister.Visible = LoginAvailable; //Do everything required for the Create User Step using (Control create = cuwReview.CreateUserStep.ContentTemplateContainer) { using (Image i = (create.FindControl("imgLogo") as Image)) { i.ImageUrl = ResolveUrl(String.Concat("~/images/", ThisSession.LogoImageName)); i.Visible = !String.IsNullOrWhiteSpace(gec.LogoImageName); } (create.FindControl("pnlOtherMembers") as Panel).Visible = gec.HasOtherPeopleSection; (create.FindControl("pnlNotificationSettings") as Panel).Visible = gec.HasNotificationSection; (create.FindControl("pnlTCVisible") as Panel).Visible = gec.TandCVisible; (create.FindControl("pnlTCHidden") as Panel).Visible = !gec.TandCVisible; using (Repeater r = (create.FindControl("rptOtherMembers") as Repeater)) { if (ThisSession.Dependents == null || ThisSession.Dependents.Count == 0) r.Visible = false; else { r.DataSource = ThisSession.Dependents.AsDataTable(); r.DataBind(); } } } //Do everyting required for the Complete Step using (Control complete = cuwReview.CompleteStep.ContentTemplateContainer) { (complete.FindControl("imgLogo") as Image).ImageUrl = ThisSession.LogoImageName; (complete.FindControl("pnlStartSearching") as Panel).Visible = LoginAvailable; (complete.FindControl("ltlRegisterComplete") as Literal).Text = gec.CheckBackText; if (LoginAvailable) { using (Literal l = (complete.FindControl("ltlStartSearching") as Literal)) { l.Text = String.Format(l.Text, ResolveUrl("~/SavingsChoice/SavingsChoiceWelcome.aspx")); //l.Text = string.Format(l.Text, Page.ClientScript.GetPostBackClientHyperlink(cuwReview, "StartSearching")); } (complete.FindControl("ltlRegisterComplete") as Literal).Text = "You are now registered."; } } //Everything that is non-step related cuwReview.DisableCreatedUser = !LoginAvailable; cuwReview.LoginCreatedUser = LoginAvailable; //if (LoginAvailable) // cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />Please try logging in via the <a href=\"Sign_In.aspx\">Sign In</a> page.<br />If you've forgotten your password please click <a href=\"../../ResetPassword.aspx\">Forgot Password</a></div>"; //else // cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />You will be able to log in as soon as the new plan year begins.</div>"; if (LoginAvailable) cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records indicate that this email address is associated with an account already.<br />Please try registering with a different email address or call us at " + ThisSession.EmployerPhone + " for assistance.<br />You can also try logging in via the <a href=\"Sign_In.aspx\">Sign In</a> page.<br />If you've forgotten your password please click <a href=\"../../ResetPassword.aspx\">Forgot Password</a></div>"; else cuwReview.DuplicateUserNameErrorMessage = "<div style=\"text-align:left;color:red;\">Our records show you've already registered.<br />You will be able to log in as soon as the new plan year begins.</div>"; } } } SetupPasswordQuestions(); SetupHearCCH(); // lam, 20130411, MSF-290 } }