示例#1
0
 protected void LoadEmployerContent()
 {
     using (GetEmployerContent gec = new GetEmployerContent(int.Parse(ThisSession.EmployerID)))
     {
         gec.PutInSession();
     }
 }
示例#2
0
 protected void LoadEmployerContent()
 {
     using (GetEmployerContent gec = new GetEmployerContent(int.Parse(ThisSession.EmployerID)))
     {
         gec.PutInSession();
     }
 }
示例#3
0
        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>"; }
        }
示例#4
0
        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();
            }
        }
示例#5
0
        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

            }
        }
示例#6
0
        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();
            }
        }
示例#7
0
        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>"; }
        }
示例#8
0
        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
            }
        }