protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HealthInformationAnswers myAnswers = (HealthInformationAnswers)Session["HealthInformationAnswers"];

                int       i      = 0;
                int       size   = myAnswers.MyAnswers.Count;
                ArrayList idList = new ArrayList(size);
                foreach (System.Web.UI.WebControls.ListItem li in myAnswers.MyAnswers)
                {
                    idList.Add(new KeyValuePair <int, string>(i, li.Text));
                    i += 1;
                }
                ControlIdList = idList;
                CreateControls();
                LastControlId = size - 1;
            }
            btnNext.Attributes.Add("onClick", "return valSubmit();");
        }
Exemplo n.º 2
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            bool hasCondition = false;
            HealthInformationAnswers myAnswers = new HealthInformationAnswers();

            foreach (ListItem li in CheckBoxList1.Items)
            {
                if (li.Selected)
                {
                    myAnswers.addAnswer(li);
                    hasCondition = true;
                }
            }
            foreach (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"))
            {
                ListItem li = new 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"))
            {
                ListItem li = new 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"))
            {
                ListItem li = new 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"))
            {
                ListItem li = new 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)
            {
                Response.Redirect("HealthExplanations.aspx");
            }
            else
            {
                if (Session["HealthStatements"] != null)
                {
                    Session.Remove("HealthStatements");
                }
                Response.Redirect("Processing.aspx");
            }
        }
Exemplo n.º 3
0
        protected void fillPdf()
        {
            ElectronicAppDBDataContext eappdb = new ElectronicAppDBDataContext();

            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }

            FillPDF myPDF = new FillPDF(Server.MapPath("~/NebraskaApp/App/"));

            if (Session["EmployeeData"] != null)
            {
                employeeData myEmployeeData = (employeeData)Session["EmployeeData"];
                myPDF.fillEmployeeData(myEmployeeData);
            }
            #region Fill Waiver Sections

            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }
            if (Session["Coverage"] != null && Session["CoverageOffered"] != null)
            {
                Coverage        myCoverage = (Coverage)Session["Coverage"];
                coverageOffered myOffered  = (coverageOffered)Session["CoverageOffered"];
                if (myOffered.IsMedical)
                {
                    if (myCoverage.isWaiving("Medical"))
                    {
                        DeclineReason myReason = (DeclineReason)Session["ReasonForDeclineHealth"];
                        myPDF.FillOutReasons(myReason, myCoverage, "Medical");
                    }
                }

                if (myOffered.IsDental)
                {
                    if (myCoverage.isWaiving("Dental"))
                    {
                        DeclineReason myReason = (DeclineReason)Session["ReasonForDeclineDental"];
                        myPDF.FillOutReasons(myReason, myCoverage, "Dental");
                    }
                }
                if (myOffered.IsLife)
                {
                    if (myCoverage.isWaiving("Life"))
                    {
                        DeclineReason myReason = (DeclineReason)Session["ReasonForDeclineLife"];
                        myPDF.FillOutReasons(myReason, myCoverage, "Life");
                    }
                }

                if (myOffered.IsVision)
                {
                    if (myCoverage.isWaiving("Vision"))
                    {
                        DeclineReason myReason = (DeclineReason)Session["ReasonForDeclineVision"];
                        myPDF.FillOutReasons(myReason, myCoverage, "Vision");
                    }
                }

                if (myOffered.IsDisability)
                {
                    if (myCoverage.isWaiving("Disability"))
                    {
                        DeclineReason myReason = (DeclineReason)Session["ReasonForDeclineDisability"];
                        myPDF.FillOutReasons(myReason, myCoverage, "Disability");
                    }
                }
            }
            #endregion

            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }
            if (Session["Coverage"] != null)
            {
                Coverage myCoverage = (Coverage)Session["Coverage"];
                myPDF.FillSelectedCoverage(myCoverage);
            }

            #region Fill Dependents
            if (Session["Dependents"] != null)
            {
                Dependents myDepenedents = (Dependents)Session["Dependents"];
                myPDF.FillDependentData(myDepenedents);
            }
            #endregion

            #region Fill Other Coverage
            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }
            if (Session["MedicareCoverage"] != null)
            {
                MedicareCoverage myMedicare = (MedicareCoverage)Session["MedicareCoverage"];
                myPDF.FillMedicare(myMedicare);
            }

            if (Session["ConcurrentCoverage"] != null)
            {
                ConcurrentCoverage myCC = (ConcurrentCoverage)Session["ConcurrentCoverage"];
                myPDF.FillConcurrent(myCC);
            }
            else
            {
                myPDF.FillConcurrent();
            }

            if (Session["PreviousCoverage"] != null)
            {
                PreviousCoverage myPrevious = (PreviousCoverage)Session["PreviousCoverage"];
                myPDF.FillPrevious(myPrevious);
            }
            else
            {
                myPDF.FillPrevious();
            }

            if (Session["LifeBeneficiaries"] != null)
            {
                LifeBeneficiaries myBeneficiaries = (LifeBeneficiaries)Session["LifeBeneficiaries"];
                myPDF.FillBeneficiaries(myBeneficiaries);
            }
            #endregion

            #region Fill Health Information
            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }
            if (Session["HealthInformationAnswers"] != null)
            {
                HealthInformationAnswers myHealth = (HealthInformationAnswers)Session["HealthInformationAnswers"];
                myPDF.FillHealthInformation(myHealth);
            }
            #endregion

            #region fill employer info
            ElectronicAppDBDataContext db             = new ElectronicAppDBDataContext();
            uspGetClientContactResult  myEmployerInfo = db.uspGetClientContact((Guid)Session["ClientID"]).First <uspGetClientContactResult>();
            myPDF.fillEmployerData(myEmployerInfo, (uspGetClientByIDResult)Session["Client"]);
            #endregion

            #region Fill Health Statements
            if (Session["UserID"] == null)
            {
                Response.Redirect("~/Default.aspx?timeout=1", false);
            }
            if (Session["HealthStatements"] != null)
            {
                HealthStatements myStatements = (HealthStatements)Session["HealthStatements"];
                myPDF.FillHealthStatements(myStatements);
            }
            #endregion

            Guid clientID = (Guid)(Session["ClientID"]);
            System.Collections.Generic.List <String> lstCarriers = new System.Collections.Generic.List <String>();

            foreach (uspGetClientCarriersResult carrier in eappdb.uspGetClientCarriers(clientID))
            {
                lstCarriers.Add(carrier.carrierName);
            }

            myPDF.fillCarriers(lstCarriers);


            myPDF.close();
            myPDF.addAdditionalPages();
            ByteBuffer filledPDF = myPDF.GetFilledPDFFlattened();
            Session.Add("Buffer", filledPDF);

            ByteBuffer unflattened = myPDF.GetFilledPDFUnflattened();
            Session.Add("PDF", unflattened);
        }