public void FillConcurrent(ConcurrentCoverage myConcurrent) { if (myConcurrent.IsMedical) { pdfFormFields.SetField("medicarecc2", "Yes"); } if (myConcurrent.IsDental) { pdfFormFields.SetField("medicarecc3", "Yes"); } if (myConcurrent.IsLife) { pdfFormFields.SetField("medicarecc4", "Yes"); } if (myConcurrent.IsVision) { pdfFormFields.SetField("medicarecc5", "Yes"); } if (myConcurrent.IsDisability) { pdfFormFields.SetField("medicarecc6", "Yes"); } if (myConcurrent.IsEmployee) { pdfFormFields.SetField("medicarecoveragetype1", "Yes"); } if (myConcurrent.IsEmployeeSpouse) { pdfFormFields.SetField("medicarecoveragetype2", "Yes"); } if (myConcurrent.IsEmployeeChild) { pdfFormFields.SetField("medicarecoveragetype3", "Yes"); } if (myConcurrent.IsEmployeeSpouseChild) { pdfFormFields.SetField("medicarecoveragetype4", "Yes"); } pdfFormFields.SetField("medicarecoveredpersons", myConcurrent.Name); pdfFormFields.SetField("medicareemployer", myConcurrent.Employer); pdfFormFields.SetField("medicarecarriernameandaddress", myConcurrent.InsuranceCompanyName); pdfFormFields.SetField("medicarepolicynumber", myConcurrent.PolicyNo); pdfFormFields.SetField("medicareeffectivedate", myConcurrent.EffectiveDate); pdfFormFields.SetField("medicareenddate", myConcurrent.EndDate); }
protected void btnNext_Click(object sender, EventArgs e) { if (Session["UserID"] != null) { if (cmbMedicare.SelectedValue.ToLower().Equals("yes")) { MedicareCoverage myMedicare = new MedicareCoverage(); myMedicare.Name = txtMedicareName.Text; myMedicare.ID = txtMedicareID.Text; myMedicare.EffDateA = txtMedicareA.Text; myMedicare.EffDateB = txtMedicareB.Text; myMedicare.EffDateC = txtMedicareC.Text; if (Session["MedicareCoverage"] == null) { Session.Add("MedicareCoverage", myMedicare); } else { Session["MedicareCoverage"] = myMedicare; } } else { if (Session["MedicareCoverage"] != null) { Session.Remove("MedicareCoverage"); } } if (cmbConcurrentCoverage.SelectedValue.ToLower().Equals("yes")) { ConcurrentCoverage myConcurrent = new ConcurrentCoverage(); myConcurrent.Name = txtConcurentName.Text; myConcurrent.Employer = txtConcurrentEmployer.Text; myConcurrent.InsuranceCompanyName = txtConcurrentProvider.Text; myConcurrent.PolicyNo = txtConcurrentPolicy.Text; myConcurrent.EffectiveDate = txtConcurrentEff.Text; myConcurrent.EndDate = txtConcurrentEnd.Text; myConcurrent.IsDental = ckDental.Checked; myConcurrent.IsDisability = ckDisability.Checked; myConcurrent.IsLife = ckLife.Checked; myConcurrent.IsMedical = ckMedical.Checked; myConcurrent.IsVision = ckVision.Checked; if (cmbConcurrentType.SelectedValue.Equals("employee", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployee = true; } else if (cmbConcurrentType.SelectedValue.Equals("employee/child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeChild = true; } else if (cmbConcurrentType.SelectedValue.Equals("employee/spouse", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeSpouse = true; } else if (cmbConcurrentType.SelectedValue.Equals("Employee/Spouse/Child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeSpouseChild = true; } if (Session["ConcurrentCoverage"] == null) { Session.Add("ConcurrentCoverage", myConcurrent); } else { Session["ConcurrentCoverage"] = myConcurrent; } } else { if (Session["ConcurrentCoverage"] != null) { Session.Remove("ConcurrentCoverage"); } } if (cmbPreviousCoverage.SelectedValue.ToLower().Equals("yes")) { PreviousCoverage myPrevious = new PreviousCoverage(); myPrevious.Names = txtPreviousName.Text; myPrevious.Employer = txtPreviousEmployer.Text; myPrevious.InsuranceCompanyName = txtPreviousProvider.Text; myPrevious.Policy = txtPolicy.Text; myPrevious.EffectiveDate = txtPreviousEff.Text; myPrevious.EndDate = txtPreviousEnd.Text; if (cmbPreviousType.SelectedValue.Equals("employee", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployee = true; } else if (cmbPreviousType.SelectedValue.Equals("employee/child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeChild = true; } else if (cmbPreviousType.SelectedValue.Equals("employee/spouse", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeSpouse = true; } else if (cmbPreviousType.SelectedValue.Equals("Employee/Spouse/Child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeSpouseChild = true; } if (Session["PreviousCoverage"] == null) { Session.Add("PreviousCoverage", myPrevious); } else { Session["PreviousCoverage"] = myPrevious; } } else { if (Session["PreviousCoverage"] != null) { Session.Remove("PreviousCoverage"); } } if (isLife.Value == "1") { LifeBeneficiaries myLife = new LifeBeneficiaries(); myLife.Primary1Name = txtPrimary1Name.Text + ", " + txtPrimary1Addr.Text; myLife.Primary1Percent = txtPrimary1Perc.Text; myLife.Primary1Relationship = txtPrimary1Relation.Text; myLife.Primary1SSN = txtPrimary1SSN.Text; myLife.Primary2Name = txtPrimary2Name.Text + ", " + txtPrimary2Addr.Text; myLife.Primary2Percent = txtPrimary2Perc.Text; myLife.Primary2Relationship = txtPrimary2Relation.Text; myLife.Primary2SSN = txtPrimary2SSN.Text; myLife.Secondary1Name = txtSecondary1Name.Text + ", " + txtSecondary1Addr.Text; myLife.Secondary1Percent = txtSecondary1Perc.Text; myLife.Secondary1Relationship = txtSecondary1Relation.Text; myLife.Secondary1SSN = txtSecondary1SSN.Text; myLife.Secondary2Name = txtSecondary2Name.Text + ", " + txtSecondary2Addr.Text; myLife.Secondary2Percent = txtSecondary2Perc.Text; myLife.Secondary2Relationship = txtSecondary2Relation.Text; myLife.Secondary2SSN = txtSecondary2SSN.Text; if (Session["LifeBeneficiaries"] == null) { Session.Add("LifeBeneficiaries", myLife); } else { Session["LifeBeneficiaries"] = myLife; } } else { if (Session["LifeBeneficiaries"] != null) { Session.Remove("LifeBeneficiaries"); } } Response.Redirect("HealthInformation.aspx"); } }
protected void UserWizard1_NextButtonClick(object sender, EventArgs e) { //Handle saving data the old way. #region Basic Info if (UserWizard1.ActiveStepIndex == 0) { if (Session["ClientID"] == null && Session["UserID"] == null) { Session.Abandon(); FormsAuthentication.SignOut(); Response.Redirect("~/Default.aspx?timeout=1"); } else { Guid ClientID = (Guid)Session["ClientID"]; Guid UserID = (Guid)Session["UserID"]; ElectronicAppDBDataContext eappdata = new ElectronicAppDBDataContext(); //eappdata.uspDoesEnrolleeExist(ClientID, txtFirstName, txtLastName, txtBirthDate); List<uspDoesEnrolleeExistResult> myResult = eappdata.uspDoesEnrolleeExist(ClientID, txtFirstName.Text, txtLastName.Text, txtMonth.Text + "/" + txtDay.Text + "/" + txtYear.Text).ToList<uspDoesEnrolleeExistResult>(); if (myResult.Count > 0) { Session["UserID"] = myResult[0].EnrolleeID; } else { eappdata.uspInsertEnrollee(UserID, ClientID, txtFirstName.Text, txtLastName.Text, txtMonth.Text + "/" + txtDay.Text + "/" + txtYear.Text, false, Request.UserHostAddress.ToString()); } employeeData myData = new employeeData(); myData.EmployeeName = txtFirstName.Text + " " + txtLastName.Text; myData.DOB = txtMonth.Text + "/" + txtDay.Text + "/" + txtYear.Text; if (cmbWaive.Text.Equals("Yes", StringComparison.CurrentCultureIgnoreCase)) { myData.WaiveAll = true; Session.Add("EmployeeData", myData); UserWizard1.ActiveStepIndex = 2; } else { myData.WaiveAll = false; Session.Add("EmployeeData", myData); } } } #endregion #region Employee Data else if (UserWizard1.ActiveStepIndex == 1) { if (Session["UserID"] != null && Session["ClientID"] != null && Session["EmployeeData"] != null) { employeeData myData = (employeeData)Session["EmployeeData"]; myData.HomeAddress = txtAddress.Text; myData.City = txtCity.Text; myData.State = txtState.Text; myData.Zip = txtZip.Text; myData.HomePhone = txtHomePhone.Text + "-" + txtHomePhone0.Text + "-" + txtHomePhone1.Text; myData.WorkPhone = txtWorkPhone.Text + "-" + txtWorkPhone0.Text + "-" + txtWorkPhone1.Text; myData.Email = txtEmail.Text; // myData.DOB = txtDOB.Text; myData.Height = txtHeight.Text; myData.Weight = txtWeight.Text; myData.Soc = txtSoc.Text + "-" + txtSoc0.Text + "-" + txtSoc1.Text; myData.JobTitle = txtTitle.Text; myData.DOH = txtHireDate.Text; myData.AvgHours = txtHours.Text; myData.Salary = txtSalary.Text; myData.EmploymentStatus = cmbStatus.SelectedValue; myData.MaritalStatus = cmbMaritalStatus.SelectedValue; myData.NumChildren = int.Parse(cmbChildren.SelectedValue); myData.PrimaryPhysician = txtPhysician.Text; if (cmbMedicare.SelectedValue.ToUpper() == "YES") { myData.Medicare = true; } else { myData.Medicare = false; } if (cmbDisabled.SelectedValue.ToUpper() == "YES") { myData.Disabled = true; } else { myData.Disabled = false; } if (cmbGender.SelectedValue.ToUpper() == "MALE") { myData.Gender = "male"; } else { myData.Gender = "female"; } Session["EmployeeData"] = myData; } else { Response.Redirect("~/Default.aspx?timeout=1", false); } } #endregion #region Coverage Selection else if (UserWizard1.ActiveStepIndex == 2) { if (Session["UserID"] != null) { if (Session["EmployeeData"] != null && Session["CoverageOffered"] != null) { employeeData myEmployeeData = (employeeData)Session["EmployeeData"]; Coverage myCoverage = new Coverage(myEmployeeData.WaiveAll); coverageOffered myCoverageOffered = (coverageOffered)Session["CoverageOffered"]; if (myCoverageOffered.IsMedical) { myCoverage.addCoverageItem(new CoverageItem("Medical", cmbMedical.SelectedValue.ToLower(), myEmployeeData.IsSingle, myEmployeeData.IsChildren)); } if (myCoverageOffered.IsDental) { myCoverage.addCoverageItem(new CoverageItem("Dental", cmbDental.SelectedValue.ToLower(), myEmployeeData.IsSingle, myEmployeeData.IsChildren)); } if (myCoverageOffered.IsVision) { myCoverage.addCoverageItem(new CoverageItem("Vision", cmbVision.SelectedValue.ToLower(), myEmployeeData.IsSingle, myEmployeeData.IsChildren)); } if (myCoverageOffered.IsLife) { myCoverage.addCoverageItem(new CoverageItem("Life", cmbLife.SelectedValue.ToLower(), myEmployeeData.IsSingle, myEmployeeData.IsChildren)); } if (myCoverageOffered.IsDisability) { myCoverage.addCoverageItem(new CoverageItem("Disability", cmbDisability.SelectedValue.ToLower(), myEmployeeData.IsSingle, myEmployeeData.IsChildren)); } if ((!myCoverageOffered.IsMedical || cmbMedical.SelectedValue.ToLower() == "waive") && (!myCoverageOffered.IsDental || cmbDental.SelectedValue.ToLower() == "waive") && (!myCoverageOffered.IsDisability || cmbDisability.SelectedValue.ToLower() == "waive") && (!myCoverageOffered.IsVision || cmbVision.SelectedValue.ToLower() == "waive") && (!myCoverageOffered.IsLife || cmbLife.SelectedValue.ToLower() == "waive")) { //myEmployeeData.WaiveAll = true; myCoverage.IsWaiveAll = true; } if (Session["Coverage"] != null) { Session["Coverage"] = myCoverage; } else { Session.Add("Coverage", myCoverage); } if (myCoverage.isWaiving("Medical")) { UserWizard1.ActiveStepIndex = 4; } else if (myCoverage.isWaiving("Dental")) { UserWizard1.ActiveStepIndex = 5; } else if (myCoverage.isWaiving("Vision")) { UserWizard1.ActiveStepIndex = 6; } else if (myCoverage.isWaiving("Life")) { UserWizard1.ActiveStepIndex = 7; } else if (myCoverage.isWaiving("Disability")) { UserWizard1.ActiveStepIndex = 8; } else { bool isSpouseCovered = false; bool isChildrenCovered = false; if (!myEmployeeData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myEmployeeData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (isSpouseCovered || isChildrenCovered) { //Do Nothing. Wizard will procede to Step 3 normally. } else { UserWizard1.ActiveStepIndex = 9; } } } else { Session.Abandon(); FormsAuthentication.SignOut(); Response.Redirect("~/Default.aspx?timeout=1"); } } else { Session.Abandon(); FormsAuthentication.SignOut(); Response.Redirect("~/Default.aspx?timeout=1"); } } #endregion #region Dependent Data else if (UserWizard1.ActiveStepIndex == 3) { if (Session["UserID"] != null) { Dependents myDependents = new Dependents(); if (isSpouse.Value.Equals("1")) { Dependent myDependent = new Dependent(); myDependent.IsSpouse = true; myDependent.Name = spName.Text; if (spGender.Text.ToLower().Equals("male")) { myDependent.Gender = 'M'; } else if (spGender.Text.ToLower().Equals("female")) { myDependent.Gender = 'F'; } myDependent.Height = spHeight.Text; myDependent.Weight = spWeight.Text; myDependent.DOB = spDOB.Text; myDependent.SSN = spSSN.Text; myDependent.PrimaryCarePhysician = spPhysician.Text; if (spStudent.Text.ToLower().Equals("yes")) { myDependent.Student = true; } else { myDependent.Student = false; } if (spMedicare.Text.ToLower().Equals("yes")) { myDependent.Medicare = true; } else { myDependent.Medicare = false; } if (spSS.Text.ToLower().Equals("yes")) { myDependent.SSEnrolled = true; } else { myDependent.SSEnrolled = false; } myDependents.addDependent(myDependent); } if (!numChildren.Value.Equals("0")) { getChildren(myDependents); } if (Session["Dependents"] != null) { Session["Dependents"] = myDependents; } else { Session.Add("Dependents", myDependents); } UserWizard1.ActiveStepIndex = 9; } } #endregion #region Medical Waive else if (UserWizard1.ActiveStepIndex == 4) { if (Session["UserID"] != null) { if ((Session["EmployeeData"] != null) && (Session["Coverage"] != null)) { bool isSpouseCovered = false; bool isChildrenCovered = false; Coverage myCoverage = (Coverage)Session["Coverage"]; employeeData myData = (employeeData)Session["EmployeeData"]; DeclineReason myReason = saveReasons(); if (Session["ReasonForDeclineHealth"] != null) { Session.Add("ReasonForDeclineHealth", myReason); } else { Session["ReasonForDeclineHealth"] = myReason; } if (!myData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (myCoverage.isWaiving("Dental")) { UserWizard1.ActiveStepIndex = 5; } else if (myCoverage.isWaiving("Vision")) { UserWizard1.ActiveStepIndex = 6; } else if (myCoverage.isWaiving("Life")) { UserWizard1.ActiveStepIndex = 7; } else if (myCoverage.isWaiving("Disability")) { UserWizard1.ActiveStepIndex = 8; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else { if (myData.WaiveAll || myCoverage.IsWaiveAll) { UserWizard1.ActiveStepIndex = 12; } else { UserWizard1.ActiveStepIndex = 9; } } } } } #endregion #region Dental Waive else if (UserWizard1.ActiveStepIndex == 5) { if (Session["UserID"] != null) { if ((Session["EmployeeData"] != null) && (Session["Coverage"] != null)) { bool isSpouseCovered = false; bool isChildrenCovered = false; Coverage myCoverage = (Coverage)Session["Coverage"]; employeeData myData = (employeeData)Session["EmployeeData"]; DeclineReason myReason = saveReasons0(); if (Session["ReasonForDeclineDental"] != null) { Session.Add("ReasonForDeclineDental", myReason); } else { Session["ReasonForDeclineDental"] = myReason; } if (!myData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (myCoverage.isWaiving("Vision")) { UserWizard1.ActiveStepIndex = 6; } else if (myCoverage.isWaiving("Life")) { UserWizard1.ActiveStepIndex = 7; } else if (myCoverage.isWaiving("Disability")) { UserWizard1.ActiveStepIndex = 8; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else { if (myData.WaiveAll || myCoverage.IsWaiveAll) { UserWizard1.ActiveStepIndex = 12; } else { UserWizard1.ActiveStepIndex = 9; } } } } } #endregion #region Vison Waive else if (UserWizard1.ActiveStepIndex == 6) { if (Session["UserID"] != null) { if ((Session["EmployeeData"] != null) && (Session["Coverage"] != null)) { bool isSpouseCovered = false; bool isChildrenCovered = false; Coverage myCoverage = (Coverage)Session["Coverage"]; employeeData myData = (employeeData)Session["EmployeeData"]; DeclineReason myReason = saveReasons1(); if (Session["ReasonForDeclineVision"] != null) { Session.Add("ReasonForDeclineVision", myReason); } else { Session["ReasonForDeclineVision"] = myReason; } if (!myData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (myCoverage.isWaiving("Life")) { UserWizard1.ActiveStepIndex = 7; } else if (myCoverage.isWaiving("Disability")) { UserWizard1.ActiveStepIndex = 8; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else { if (myData.WaiveAll || myCoverage.IsWaiveAll) { UserWizard1.ActiveStepIndex = 12; } else { UserWizard1.ActiveStepIndex = 9; } } } } } #endregion #region Life Waive else if (UserWizard1.ActiveStepIndex == 7) { if (Session["UserID"] != null) { if ((Session["EmployeeData"] != null) && (Session["Coverage"] != null)) { bool isSpouseCovered = false; bool isChildrenCovered = false; Coverage myCoverage = (Coverage)Session["Coverage"]; employeeData myData = (employeeData)Session["EmployeeData"]; DeclineReason myReason = saveReasons2(); if (Session["ReasonForDeclineLife"] != null) { Session.Add("ReasonForDeclineLife", myReason); } else { Session["ReasonForDeclineLife"] = myReason; } if (!myData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (myCoverage.isWaiving("Disability")) { UserWizard1.ActiveStepIndex = 8; } else if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else { if (myData.WaiveAll || myCoverage.IsWaiveAll) { UserWizard1.ActiveStepIndex = 12; } else { UserWizard1.ActiveStepIndex = 9; } } } } } #endregion #region Disability Waive else if (UserWizard1.ActiveStepIndex == 8) { if (Session["UserID"] != null) { if ((Session["EmployeeData"] != null) && (Session["Coverage"] != null)) { bool isSpouseCovered = false; bool isChildrenCovered = false; Coverage myCoverage = (Coverage)Session["Coverage"]; employeeData myData = (employeeData)Session["EmployeeData"]; DeclineReason myReason = saveReasons3(); if (Session["ReasonForDeclineDisability"] != null) { Session.Add("ReasonForDeclineDisability", myReason); } else { Session["ReasonForDeclineDisability"] = myReason; } if (!myData.IsSingle) { isSpouseCovered = myCoverage.isSpouseCovered(); } if (myData.IsChildren) { isChildrenCovered = myCoverage.isChildCovered(); } if (isSpouseCovered || isChildrenCovered) { UserWizard1.ActiveStepIndex = 3; } else { if (myData.WaiveAll || myCoverage.IsWaiveAll) { UserWizard1.ActiveStepIndex = 12; } else { UserWizard1.ActiveStepIndex = 9; } } } } } #endregion #region Other Coverage else if (UserWizard1.ActiveStepIndex == 9) { if (Session["UserID"] != null) { if (cmbMedicare.SelectedValue.ToLower().Equals("yes")) { MedicareCoverage myMedicare = new MedicareCoverage(); myMedicare.Name = txtMedicareName.Text; myMedicare.ID = txtMedicareID.Text; myMedicare.EffDateA = txtMedicareA.Text; myMedicare.EffDateB = txtMedicareB.Text; myMedicare.EffDateC = txtMedicareC.Text; if (Session["MedicareCoverage"] == null) { Session.Add("MedicareCoverage", myMedicare); } else { Session["MedicareCoverage"] = myMedicare; } } else { if (Session["MedicareCoverage"] != null) { Session.Remove("MedicareCoverage"); } } if (cmbConcurrentCoverage.SelectedValue.ToLower().Equals("yes")) { ConcurrentCoverage myConcurrent = new ConcurrentCoverage(); myConcurrent.Name = txtConcurentName.Text; myConcurrent.Employer = txtConcurrentEmployer.Text; myConcurrent.InsuranceCompanyName = txtConcurrentProvider.Text; myConcurrent.PolicyNo = txtConcurrentPolicy.Text; myConcurrent.EffectiveDate = txtConcurrentEff.Text; myConcurrent.EndDate = txtConcurrentEnd.Text; myConcurrent.IsDental = ckDental.Checked; myConcurrent.IsDisability = ckDisability.Checked; myConcurrent.IsLife = ckLife.Checked; myConcurrent.IsMedical = ckMedical.Checked; myConcurrent.IsVision = ckVision.Checked; if (cmbConcurrentType.SelectedValue.Equals("employee", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployee = true; } else if (cmbConcurrentType.SelectedValue.Equals("employee/child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeChild = true; } else if (cmbConcurrentType.SelectedValue.Equals("employee/spouse", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeSpouse = true; } else if (cmbConcurrentType.SelectedValue.Equals("Employee/Spouse/Child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myConcurrent.IsEmployeeSpouseChild = true; } if (Session["ConcurrentCoverage"] == null) { Session.Add("ConcurrentCoverage", myConcurrent); } else { Session["ConcurrentCoverage"] = myConcurrent; } } else { if (Session["ConcurrentCoverage"] != null) { Session.Remove("ConcurrentCoverage"); } } if (cmbPreviousCoverage.SelectedValue.ToLower().Equals("yes")) { PreviousCoverage myPrevious = new PreviousCoverage(); myPrevious.Names = txtPreviousName.Text; myPrevious.Employer = txtPreviousEmployer.Text; myPrevious.InsuranceCompanyName = txtPreviousProvider.Text; myPrevious.Policy = txtPolicy.Text; myPrevious.EffectiveDate = txtPreviousEff.Text; myPrevious.EndDate = txtPreviousEnd.Text; if (cmbPreviousType.SelectedValue.Equals("employee", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployee = true; } else if (cmbPreviousType.SelectedValue.Equals("employee/child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeChild = true; } else if (cmbPreviousType.SelectedValue.Equals("employee/spouse", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeSpouse = true; } else if (cmbPreviousType.SelectedValue.Equals("Employee/Spouse/Child(ren)", StringComparison.CurrentCultureIgnoreCase)) { myPrevious.IsEmployeeSpouseChild = true; } if (Session["PreviousCoverage"] == null) { Session.Add("PreviousCoverage", myPrevious); } else { Session["PreviousCoverage"] = myPrevious; } } else { if (Session["PreviousCoverage"] != null) { Session.Remove("PreviousCoverage"); } } if (isLife.Value == "1") { LifeBeneficiaries myLife = new LifeBeneficiaries(); myLife.Primary1Name = txtPrimary1Name.Text + ", " + txtPrimary1Addr.Text; myLife.Primary1Percent = txtPrimary1Perc.Text; myLife.Primary1Relationship = txtPrimary1Relation.Text; myLife.Primary1SSN = txtPrimary1SSN.Text; myLife.Primary2Name = txtPrimary2Name.Text + ", " + txtPrimary2Addr.Text; myLife.Primary2Percent = txtPrimary2Perc.Text; myLife.Primary2Relationship = txtPrimary2Relation.Text; myLife.Primary2SSN = txtPrimary2SSN.Text; myLife.Secondary1Name = txtSecondary1Name.Text + ", " + txtSecondary1Addr.Text; myLife.Secondary1Percent = txtSecondary1Perc.Text; myLife.Secondary1Relationship = txtSecondary1Relation.Text; myLife.Secondary1SSN = txtSecondary1SSN.Text; myLife.Secondary2Name = txtSecondary2Name.Text + ", " + txtSecondary2Addr.Text; myLife.Secondary2Percent = txtSecondary2Perc.Text; myLife.Secondary2Relationship = txtSecondary2Relation.Text; myLife.Secondary2SSN = txtSecondary2SSN.Text; if (Session["LifeBeneficiaries"] == null) { Session.Add("LifeBeneficiaries", myLife); } else { Session["LifeBeneficiaries"] = myLife; } } else { if (Session["LifeBeneficiaries"] != null) { Session.Remove("LifeBeneficiaries"); } } } } #endregion #region Health Information else if (UserWizard1.ActiveStepIndex == 10) { bool hasCondition = false; HealthInformationAnswers myAnswers = new HealthInformationAnswers(); foreach (System.Web.UI.WebControls.ListItem li in CheckBoxList1.Items) { if (li.Selected) { myAnswers.addAnswer(li); hasCondition = true; } } foreach (System.Web.UI.WebControls.ListItem li in CheckBoxList3.Items) { if (li.Selected) { myAnswers.addAnswer(li); hasCondition = true; } } if (txtDueDate.Text != "") { myAnswers.DueData = txtDueDate.Text; } else { myAnswers.DueData = ""; } if (Q32.Text.ToLower().Equals("yes")) { System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("32. Have you or any of your dependents recieved inpatiant or outpatient services in the last 3 years (excluding routine tests, physicals or inoculations)?", "Q32", true); li.Selected = true; myAnswers.addAnswer(li); myAnswers.Q32 = true; hasCondition = true; } if (Q33.Text.ToLower().Equals("yes")) { System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("33. Do you or any person named in this application have tests, treatments, hospitalization or surgery planned or recommended in the future?", "Q33", true); li.Selected = true; myAnswers.addAnswer(li); myAnswers.Q33 = true; hasCondition = true; } if (Q34.Text.ToLower().Equals("yes")) { System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("34. Do you or any person named in this application take any medicine, prescription drugs or require shots/injections?", "Q34", true); li.Selected = true; myAnswers.addAnswer(li); myAnswers.Q34 = true; hasCondition = true; } if (Q35.Text.ToLower().Equals("yes")) { System.Web.UI.WebControls.ListItem li = new System.Web.UI.WebControls.ListItem("35. Do you or any person named in this application have any other medical conditions which have not yet been previously mentioned?", "Q35", true); li.Selected = true; myAnswers.addAnswer(li); myAnswers.Q35 = true; hasCondition = true; } Session.Add("HealthInformationAnswers", myAnswers); if (!hasCondition) { if (Session["HealthStatements"] != null) { Session.Remove("HealthStatements"); } UserWizard1.ActiveStepIndex = 12; } else { //Response.Redirect("~/NebraskaApp/HealthExplanations.aspx", false); HealthStatements hs = new HealthStatements(); HealthStatement mystatem = new HealthStatement(); mystatem.Condition = "Text"; mystatem.DateDiagnosed = "Date"; mystatem.DateLastTreated = "Date"; mystatem.IsMedication = false; mystatem.Name = "Foo"; mystatem.Question = "Question?"; mystatem.QuestionNum = "1a"; mystatem.Recovery = "sdfshjdlkf"; mystatem.RowID = 1; mystatem.TreatmentType = "jdflskdj"; //hs.addStatement(mystatem); if (Session["HealthStatements"] == null) { Session.Add("HealthStatements", hs); } ObjectDataSource1.Select(); } } #endregion #region Health Explanations else if (UserWizard1.ActiveStepIndex == 11) { HealthStatements myStatements = new HealthStatements(); /*foreach (KeyValuePair<int, string> id in ControlIdList) { DynamicTableControl control = (DynamicTableControl)m_controls[id.Key]; foreach (int id2 in control.RowIdList) { RowControl r = (RowControl)control.MyRows[id2]; HealthStatement myStatement = r.getHealthStatement(); myStatement.QuestionNum = id.Value.Split('.')[0]; myStatement.Question = id.Value; myStatement.RowID = id2; myStatements.addStatement(myStatement); } }*/ if (Session["HealthStatements"] != null) { //Session.Add("HealthStatements", myStatements); } else { //Session["HealthStatements"] = myStatements; } } #endregion #region Processing else if (UserWizard1.ActiveStepIndex == 12) { fillPdf(); } #endregion #region Review And Sign else if (UserWizard1.ActiveStepIndex == 13) { //Simply pass control to next step. } #endregion }