Exemplo n.º 1
0
        protected void Continue(object sender, EventArgs e)
        {
            if (!Page.IsValid)
            {
                return;
            }

            ////Dictionary<Int32, Tuple<String, String>> connections = null;
            //Get the connection string for the specific database if it isn't already in the view state
            if (ConnString == String.Empty)
            {
                using (GetEmployerConnString gecs = new GetEmployerConnString(hfEmployerIDFromURL.Value))
                    if (!gecs.HasErrors)
                    {
                        ////if (gecs.EmployerRows.Length > 1)
                        ////{
                        ////    connections = new Dictionary<int, Tuple<string, string>>();
                        ////    gecs.ForEach(delegate(object[] row)
                        ////    {
                        ////        connections.Add(Convert.ToInt32(row[0]),
                        ////            new Tuple<string, string>(row[1].ToString(), row[2].ToString()));
                        ////    });
                        ////}
                        ConnString = gecs.ConnectionString;
                        EmployerID = gecs.EmployerID.ToString();
                    }
            }

            if (ConnString != String.Empty)
            {
                ThisSession.CnxString = ConnString;
            }
            if (EmployerID != String.Empty)
            {
                ThisSession.EmployerID = EmployerID;
            }

            //Check if the employee exists and if they do, store session info and move on
            using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment())
            {
                //gee.Firstname = txtFirstName.Text;
                gee.LastName = Encoder.HtmlEncode(txtLastName.Text);
                if (!String.IsNullOrWhiteSpace(cmidfWelcome.MemberIDText.Replace("X", "")))
                {
                    gee.MemberID = cmidfWelcome.MemberIDText;
                }
                else
                {
                    gee.SSN = Encoder.HtmlEncode(txtSSN.Text);
                }
                //if(txtPremera1.Text != "XXXXXXX" && txtPremera2.Text != "XX") //From this point validation has already passed so this indicates they are using the member id
                //gee.MemberID = txtPremera1.Text + txtPremera2.Text;
                //else
                //gee.SSN = txtSSN.Text;
                gee.DOB = String.Format("{0}-{2}-{1}", Encoder.HtmlEncode(txtYear.Text), Encoder.HtmlEncode(txtDay.Text), Encoder.HtmlEncode(txtMonth.Text));// txtMonth.Text, txtDay.Text, txtYear.Text));
                gee.GetData(ConnString);

                if (gee.PutInSession())
                {
                    lblNotFound.Visible = lblError.Visible = false;

                    //////JM 11/28/12 (TO BE REMOVED 9/16/13)
                    //////For Sanmina change the employer id and cnxstring to the BCBS version if this employee is not an AETNA insured employee
                    ////if (hfEmployerIDFromURL.Value.Trim().ToLower().Contains("sanmina"))
                    ////{
                    ////    if (ThisSession.MedicalPlanType.ToLower().Contains("bcbs"))
                    ////    {
                    ////        ThisSession.EmployerID = connections.Single(cnn => cnn.Value.Item2.ToLower().Contains("bcbs")).Key.ToString();
                    ////        ThisSession.CnxString = connections[Convert.ToInt32(ThisSession.EmployerID)].Item1;
                    ////    }
                    ////}

                    if (Debugger.IsAttached && Request.QueryString["e"] != null)
                    {
                        Response.Redirect("Review.aspx?e=" + Encoder.HtmlEncode(Request.QueryString["e"]));
                    }
                    else
                    {
                        Response.Redirect("Review.aspx");
                    }
                }
                else
                { // Membership not found
                    pnlReg.Visible     = false;
                    pnlCapture.Visible = true;
                }
            }
        }
Exemplo n.º 2
0
        protected void Continue(object sender, EventArgs e)
        {
            if (!Page.IsValid) return;

            ////Dictionary<Int32, Tuple<String, String>> connections = null;
            //Get the connection string for the specific database if it isn't already in the view state
            if (ConnString == String.Empty)
                using (GetEmployerConnString gecs = new GetEmployerConnString(hfEmployerIDFromURL.Value))
                    if (!gecs.HasErrors)
                    {
                        ////if (gecs.EmployerRows.Length > 1)
                        ////{
                        ////    connections = new Dictionary<int, Tuple<string, string>>();
                        ////    gecs.ForEach(delegate(object[] row)
                        ////    {
                        ////        connections.Add(Convert.ToInt32(row[0]),
                        ////            new Tuple<string, string>(row[1].ToString(), row[2].ToString()));
                        ////    });
                        ////}
                        ConnString = gecs.ConnectionString;
                        EmployerID = gecs.EmployerID.ToString();
                    }

            if (ConnString != String.Empty)
                ThisSession.CnxString = ConnString;
            if (EmployerID != String.Empty)
                ThisSession.EmployerID = EmployerID;

            //Check if the employee exists and if they do, store session info and move on
            using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment())
            {
                //gee.Firstname = txtFirstName.Text;
                gee.LastName = Encoder.HtmlEncode(txtLastName.Text);
                if (!String.IsNullOrWhiteSpace(cmidfWelcome.MemberIDText.Replace("X","")))
                    gee.MemberID = cmidfWelcome.MemberIDText;
                else
                    gee.SSN = Encoder.HtmlEncode(txtSSN.Text);
                //if(txtPremera1.Text != "XXXXXXX" && txtPremera2.Text != "XX") //From this point validation has already passed so this indicates they are using the member id
                //gee.MemberID = txtPremera1.Text + txtPremera2.Text;
                //else
                //gee.SSN = txtSSN.Text;
                gee.DOB = String.Format("{0}-{2}-{1}", Encoder.HtmlEncode(txtYear.Text), Encoder.HtmlEncode(txtDay.Text), Encoder.HtmlEncode(txtMonth.Text));// txtMonth.Text, txtDay.Text, txtYear.Text));
                gee.GetData(ConnString);

                if (gee.PutInSession())
                {
                    lblNotFound.Visible = lblError.Visible = false;

                    //////JM 11/28/12 (TO BE REMOVED 9/16/13)
                    //////For Sanmina change the employer id and cnxstring to the BCBS version if this employee is not an AETNA insured employee
                    ////if (hfEmployerIDFromURL.Value.Trim().ToLower().Contains("sanmina"))
                    ////{
                    ////    if (ThisSession.MedicalPlanType.ToLower().Contains("bcbs"))
                    ////    {
                    ////        ThisSession.EmployerID = connections.Single(cnn => cnn.Value.Item2.ToLower().Contains("bcbs")).Key.ToString();
                    ////        ThisSession.CnxString = connections[Convert.ToInt32(ThisSession.EmployerID)].Item1;
                    ////    }
                    ////}

                    if (Debugger.IsAttached && Request.QueryString["e"] != null)
                        Response.Redirect("Review.aspx?e=" + Encoder.HtmlEncode( Request.QueryString["e"]) );
                    else
                        Response.Redirect("Review.aspx");
                }
                else
                { // Membership not found
                    pnlReg.Visible = false;
                    pnlCapture.Visible = true;
                }
            }
        }