Exemplo n.º 1
0
        protected void Continue(object sender, EventArgs e)
        {
            //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("AnalogDevices")) //2 = Analog Devices
                    if (!gecs.HasErrors)
                    {
                        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);
                gee.MemberID = Encoder.HtmlEncode(txtMemID.Text);
                gee.DOB      = Encoder.HtmlEncode(txtDOB.Text);
                gee.GetData(ConnString);

                if (!gee.HasErrors)
                {
                    if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0)
                    {
                        lblNotFound.Visible = false;
                        lblError.Visible    = false;

                        ThisSession.CCHID               = gee.CCHID;
                        ThisSession.EmployeeID          = gee.EmployeeID;
                        ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID;
                        ThisSession.SubscriberRXID      = gee.SubscriberRXID;
                        ThisSession.LastName            = gee.LastName;
                        //ThisSession.FirstName = gee.Firstname;
                        ThisSession.PatientAddress1    = gee.Address1;
                        ThisSession.PatientAddress2    = gee.Address2;
                        ThisSession.PatientCity        = gee.City;
                        ThisSession.PatientState       = gee.State;
                        ThisSession.PatientZipCode     = gee.ZipCode;
                        ThisSession.PatientLatitude    = gee.Latitude;
                        ThisSession.PatientLongitude   = gee.Longitude;
                        ThisSession.PatientDateOfBirth = gee.DOB;
                        ThisSession.PatientPhone       = gee.Phone;
                        ThisSession.HealthPlanType     = gee.HealthPlanType;
                        ThisSession.MedicalPlanType    = gee.MedicalPlanType;
                        ThisSession.RxPlanType         = gee.RxPlanType;
                        ThisSession.PatientGender      = gee.Gender;
                        ThisSession.Parent             = gee.Parent;
                        ThisSession.Adult        = gee.Adult;
                        ThisSession.PatientEmail = gee.Email;

                        if (gee.Insurer != String.Empty)
                        {
                            ThisSession.Insurer = gee.Insurer;
                        }
                        if (gee.RXProvider != String.Empty)
                        {
                            ThisSession.RXProvider = gee.RXProvider;
                        }

                        if (gee.DependentTable.TableName != "EmptyTable")
                        {
                            Dependents deps = new Dependents();
                            Dependent  dep  = null;

                            gee.ForEachDependent(delegate(DataRow dr)
                            {
                                dep                     = new Dependent();
                                dep.CCHID               = int.Parse(dr["CCHID"].ToString());
                                dep.FirstName           = dr["FirstName"].ToString();
                                dep.LastName            = dr["LastName"].ToString();
                                dep.DateOfBirth         = DateTime.Parse(dr["DateOfBirth"].ToString());
                                dep.Age                 = int.Parse(dr["Age"].ToString());
                                dep.IsAdult             = int.Parse(dr["Adult"].ToString()) == 1 ? true : false;
                                dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false;
                                dep.RelationshipText    = dr["RelationshipText"].ToString();
                                dep.DepToUserGranted    = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false;
                                dep.UserToDepGranted    = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false;
                                dep.Email               = dr["Email"].ToString();

                                deps.Add(dep);
                            });
                            ThisSession.Dependents = deps;
                        }
                        if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable")
                        {
                            ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved;
                        }
                        Response.Redirect("Review.aspx");
                    }
                    else
                    {
                        lblNotFound.Visible = true;
                    }
                }
                else
                {
                    lblError.Visible = true;
                }
            }
        }
Exemplo n.º 2
0
        protected void Continue(object sender, EventArgs e)
        {
            if (!Page.IsValid)
            {
                return;
            }
            //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("Starbucks"))
                    if (!gecs.HasErrors)
                    {
                        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);
                gee.SSN      = "zzzz";
                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 = Encoder.HtmlEncode(txtPremera1.Text) + Encoder.HtmlEncode(txtPremera2.Text);
                }
                else
                {
                    gee.SSN = Encoder.HtmlEncode(txtSSN.Text);
                }
                gee.DOB = String.Format("{2}-{1}-{0}", txtMonth.Text, txtDay.Text, txtYear.Text);
                gee.GetData(ConnString);

                if (!gee.HasErrors)
                {
                    if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0)
                    {
                        lblNotFound.Visible = false;
                        lblError.Visible    = false;

                        ThisSession.CCHID               = gee.CCHID;
                        ThisSession.EmployeeID          = gee.EmployeeID;
                        ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID;
                        ThisSession.SubscriberRXID      = gee.SubscriberRXID;
                        ThisSession.LastName            = gee.LastName;
                        ThisSession.FirstName           = gee.FirstName;
                        ThisSession.PatientAddress1     = gee.Address1;
                        ThisSession.PatientAddress2     = gee.Address2;
                        ThisSession.PatientCity         = gee.City;
                        ThisSession.PatientState        = gee.State;
                        ThisSession.PatientZipCode      = gee.ZipCode;
                        ThisSession.PatientLatitude     = gee.Latitude;
                        ThisSession.PatientLongitude    = gee.Longitude;
                        ThisSession.PatientDateOfBirth  = gee.DOB;
                        ThisSession.PatientPhone        = gee.Phone;
                        ThisSession.HealthPlanType      = gee.HealthPlanType;
                        ThisSession.MedicalPlanType     = gee.MedicalPlanType;
                        ThisSession.RxPlanType          = gee.RxPlanType;
                        ThisSession.PatientGender       = gee.Gender;
                        ThisSession.Parent              = gee.Parent;
                        ThisSession.Adult               = gee.Adult;
                        ThisSession.PatientEmail        = gee.Email;

                        if (gee.Insurer != String.Empty)
                        {
                            ThisSession.Insurer = gee.Insurer;
                        }
                        if (gee.RXProvider != String.Empty)
                        {
                            ThisSession.RXProvider = gee.RXProvider;
                        }

                        if (gee.DependentTable.TableName != "EmptyTable")
                        {
                            Dependents deps = new Dependents();
                            Dependent  dep  = null;

                            gee.ForEachDependent(delegate(DataRow dr)
                            {
                                dep                     = new Dependent();
                                dep.CCHID               = int.Parse(dr["CCHID"].ToString());
                                dep.FirstName           = dr["FirstName"].ToString();
                                dep.LastName            = dr["LastName"].ToString();
                                dep.DateOfBirth         = DateTime.Parse(dr["DateOfBirth"].ToString());
                                dep.Age                 = int.Parse(dr["Age"].ToString());
                                dep.IsAdult             = int.Parse(dr["Adult"].ToString()) == 1 ? true : false;
                                dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false;
                                dep.RelationshipText    = dr["RelationshipText"].ToString();
                                dep.DepToUserGranted    = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false;
                                dep.UserToDepGranted    = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false;
                                dep.Email               = dr["Email"].ToString();

                                deps.Add(dep);
                            });
                            ThisSession.Dependents = deps;
                        }
                        if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable")
                        {
                            ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved;
                        }
                        Response.Redirect("Review.aspx");
                    }
                    else
                    {
                        pnlReg.Visible = false; pnlCapture.Visible = true;
                    }                                                      //Membership not found
                }
                else
                {
                    lblError.Visible = true;
                }                           //General error validating
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Puts the relevant data into session from a DataSet object rather than storing the whole object in session
        /// </summary>
        /// <param name="info">The GetEmployeeEnrollment Object filled with data</param>
        /// <returns>True if successfull, False if there are errors or no data</returns>
        public static Boolean PutInSession(this GetEmployeeEnrollment info)
        {
            //General exit statuses
            if (info.HasErrors)
            {
                return(false);
            }
            if (info.Tables.Count == 0)
            {
                return(false);
            }
            if (info.Tables[0].Rows.Count == 0)
            {
                return(false);
            }

            //Employee info
            if (info.EmployeeTable.TableName == "Empty")
            {
                return(false);
            }
            if (info.EmployeeTable.Rows.Count == 0)
            {
                return(false);
            }

            ThisSession.CCHID               = info.CCHID;
            ThisSession.EmployeeID          = info.EmployeeID;
            ThisSession.SubscriberMedicalID = info.SubscriberMedicalID;
            ThisSession.SubscriberRXID      = info.SubscriberRXID;
            ThisSession.LastName            = info.LastName;
            ThisSession.FirstName           = info.FirstName;
            ThisSession.PatientAddress1     = info.Address1;
            ThisSession.PatientAddress2     = info.Address2;
            ThisSession.PatientCity         = info.City;
            ThisSession.PatientState        = info.State;
            ThisSession.PatientZipCode      = info.ZipCode;
            ThisSession.PatientLatitude     = info.Latitude;
            ThisSession.PatientLongitude    = info.Longitude;
            ThisSession.PatientDateOfBirth  = info.DOB;
            ThisSession.PatientPhone        = info.Phone;
            ThisSession.HealthPlanType      = info.HealthPlanType;
            ThisSession.MedicalPlanType     = info.MedicalPlanType;
            ThisSession.RxPlanType          = info.RxPlanType;
            ThisSession.PatientGender       = info.Gender;
            ThisSession.Parent              = info.Parent;
            ThisSession.Adult               = info.Adult;
            ThisSession.PatientEmail        = info.Email;

            if (info.Insurer != string.Empty)
            {
                ThisSession.Insurer = info.Insurer;
            }
            if (info.RXProvider != string.Empty)
            {
                ThisSession.RXProvider = info.RXProvider;
            }

            //Dependent Info
            if (info.DependentTable.TableName != "EmptyTable")
            {
                Dependents deps = new Dependents();
                info.ForEachDependent(delegate(DataRow dr)
                {
                    deps.Add(dr.DependentFromRow());
                });
                ThisSession.Dependents = deps;
            }

            //You Could Have Saved
            if (info.YouCouldHaveSavedTable.TableName != "EmptyTable")
            {
                ThisSession.YouCouldHaveSaved = (int)info.YouCouldHaveSaved;
            }

            //Alternate plans
            if (info.AlternateTable.TableName != "EmptyTable" && info.AlternateTable.Rows.Count > 0)
            {
                //JM 9/16/13 - At this time we only support one split
                ThisSession.EmployerID = info.AlternateEmployerID.ToString();
                ThisSession.CnxString  = info.AlternateConnectionString;
            }

            return(true);
        }
Exemplo n.º 4
0
        protected void Continue(object sender, EventArgs e)
        {
            if (!Page.IsValid) return;
            //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("Starbucks"))
                    if (!gecs.HasErrors)
                    {
                        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);
                gee.SSN = "zzzz";
                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 = Encoder.HtmlEncode(txtPremera1.Text) + Encoder.HtmlEncode(txtPremera2.Text);
                else
                    gee.SSN = Encoder.HtmlEncode(txtSSN.Text);
                gee.DOB = String.Format("{2}-{0}-{1}", txtMonth.Text, txtDay.Text, txtYear.Text);
                gee.GetData(ConnString);

                if (!gee.HasErrors)
                {
                    if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0)
                    {
                        lblNotFound.Visible = false;
                        lblError.Visible = false;

                        ThisSession.CCHID = gee.CCHID;
                        ThisSession.EmployeeID = gee.EmployeeID;
                        ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID;
                        ThisSession.SubscriberRXID = gee.SubscriberRXID;
                        ThisSession.LastName = gee.LastName;
                        ThisSession.FirstName = gee.FirstName;
                        ThisSession.PatientAddress1 = gee.Address1;
                        ThisSession.PatientAddress2 = gee.Address2;
                        ThisSession.PatientCity = gee.City;
                        ThisSession.PatientState = gee.State;
                        ThisSession.PatientZipCode = gee.ZipCode;
                        ThisSession.PatientLatitude = gee.Latitude;
                        ThisSession.PatientLongitude = gee.Longitude;
                        ThisSession.PatientDateOfBirth = gee.DOB;
                        ThisSession.PatientPhone = gee.Phone;
                        ThisSession.HealthPlanType = gee.HealthPlanType;
                        ThisSession.MedicalPlanType = gee.MedicalPlanType;
                        ThisSession.RxPlanType = gee.RxPlanType;
                        ThisSession.PatientGender = gee.Gender;
                        ThisSession.Parent = gee.Parent;
                        ThisSession.Adult = gee.Adult;
                        ThisSession.PatientEmail = gee.Email;

                        if (gee.Insurer != String.Empty)
                            ThisSession.Insurer = gee.Insurer;
                        if (gee.RXProvider != String.Empty)
                            ThisSession.RXProvider = gee.RXProvider;

                        if (gee.DependentTable.TableName != "EmptyTable")
                        {
                            Dependents deps = new Dependents();
                            Dependent dep = null;

                            gee.ForEachDependent(delegate(DataRow dr)
                            {
                                dep = new Dependent();
                                dep.CCHID = int.Parse(dr["CCHID"].ToString());
                                dep.FirstName = dr["FirstName"].ToString();
                                dep.LastName = dr["LastName"].ToString();
                                dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString());
                                dep.Age = int.Parse(dr["Age"].ToString());
                                dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false;
                                dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false;
                                dep.RelationshipText = dr["RelationshipText"].ToString();
                                dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false;
                                dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false;
                                dep.Email = dr["Email"].ToString();

                                deps.Add(dep);
                            });
                            ThisSession.Dependents = deps;
                        }
                        if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable")
                            ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved;
                        Response.Redirect("Review.aspx");
                    }
                    else
                    { pnlReg.Visible = false; pnlCapture.Visible = true; } //Membership not found
                }
                else
                { lblError.Visible = true; }//General error validating
            }
        }
Exemplo n.º 5
0
        protected void Continue(object sender, EventArgs e)
        {
            //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("AnalogDevices")) //2 = Analog Devices
                    if (!gecs.HasErrors)
                    {
                        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);
                gee.MemberID = Encoder.HtmlEncode(txtMemID.Text);
                gee.DOB = Encoder.HtmlEncode(txtDOB.Text);
                gee.GetData(ConnString);

                if (!gee.HasErrors)
                {
                    if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0)
                    {
                        lblNotFound.Visible = false;
                        lblError.Visible = false;

                        ThisSession.CCHID = gee.CCHID;
                        ThisSession.EmployeeID = gee.EmployeeID;
                        ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID;
                        ThisSession.SubscriberRXID = gee.SubscriberRXID;
                        ThisSession.LastName = gee.LastName;
                        //ThisSession.FirstName = gee.Firstname;
                        ThisSession.PatientAddress1 = gee.Address1;
                        ThisSession.PatientAddress2 = gee.Address2;
                        ThisSession.PatientCity = gee.City;
                        ThisSession.PatientState = gee.State;
                        ThisSession.PatientZipCode = gee.ZipCode;
                        ThisSession.PatientLatitude = gee.Latitude;
                        ThisSession.PatientLongitude = gee.Longitude;
                        ThisSession.PatientDateOfBirth = gee.DOB;
                        ThisSession.PatientPhone = gee.Phone;
                        ThisSession.HealthPlanType = gee.HealthPlanType;
                        ThisSession.MedicalPlanType = gee.MedicalPlanType;
                        ThisSession.RxPlanType = gee.RxPlanType;
                        ThisSession.PatientGender = gee.Gender;
                        ThisSession.Parent = gee.Parent;
                        ThisSession.Adult = gee.Adult;
                        ThisSession.PatientEmail = gee.Email;

                        if (gee.Insurer != String.Empty)
                            ThisSession.Insurer = gee.Insurer;
                        if (gee.RXProvider != String.Empty)
                            ThisSession.RXProvider = gee.RXProvider;

                        if (gee.DependentTable.TableName != "EmptyTable")
                        {
                            Dependents deps = new Dependents();
                            Dependent dep = null;

                            gee.ForEachDependent(delegate(DataRow dr)
                            {
                                dep = new Dependent();
                                dep.CCHID = int.Parse(dr["CCHID"].ToString());
                                dep.FirstName = dr["FirstName"].ToString();
                                dep.LastName = dr["LastName"].ToString();
                                dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString());
                                dep.Age = int.Parse(dr["Age"].ToString());
                                dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false;
                                dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false;
                                dep.RelationshipText = dr["RelationshipText"].ToString();
                                dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false;
                                dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false;
                                dep.Email = dr["Email"].ToString();

                                deps.Add(dep);
                            });
                            ThisSession.Dependents = deps;
                        }
                        if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable")
                            ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved;
                        Response.Redirect("Review.aspx");
                    }
                    else
                    { lblNotFound.Visible = true; }
                }
                else
                { lblError.Visible = true; }
            }
        }