// public string ClientName;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["ClientID"] != null)
                {
                    Guid myClientID = (Guid)Session["ClientID"];
                    try
                    {
                        ElectronicAppDBDataContext electronicAppDB = new ElectronicAppDBDataContext();
                        ElectronicAppStorageDBDataContext electronicAppStorageDB = new ElectronicAppStorageDBDataContext();
                        uspGetClientByIDResult myClient = electronicAppDB.uspGetClientByID(myClientID).Single<uspGetClientByIDResult>();
                        uspGetClientContactResult myClientContact = electronicAppDB.uspGetClientContact(myClient.ClientID).Single<uspGetClientContactResult>();
                        uspGetBrokerByIDResult myBroker = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single<uspGetBrokerByIDResult>();
                        uspGetBrokerContactResult myBrokerInfo = electronicAppDB.uspGetBrokerContact(myBroker.BrokerID).Single<uspGetBrokerContactResult>();
                        string ClientName = myClient.EmployerName;

                        uspGetBrokerByIDResult broker = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single<uspGetBrokerByIDResult>();

                        System.Collections.Generic.List<uspGetBrokerImageByOwnerIDResult> searches = electronicAppStorageDB.uspGetBrokerImageByOwnerID(broker.BrokerID).ToList<uspGetBrokerImageByOwnerIDResult>();

                        bool hasImage = searches.Count > 0;

                        if (hasImage)
                        {
                            Image1.ImageUrl = "/BrokerImages/Broker.ashx?id=" + broker.BrokerID.ToString();
                        }

                        header.InnerHtml = "<span class=\"red\">Welcome</span> " + ClientName;
                        BrokerName.InnerHtml = myBroker.FirstName + " " + myBroker.LastName;
                        BrokerEmail.InnerHtml = myBrokerInfo.Email;
                        BrokerPhone.InnerHtml = myBrokerInfo.PhoneNumber;
                        BrokerFax.InnerHtml = myBrokerInfo.Fax;
                        BrokerAddress.InnerHtml = myBrokerInfo.Address;
                        BrokerAddress2.InnerHtml = myBrokerInfo.City + ", " + myBrokerInfo.State + " " + myBrokerInfo.Zip;

                        Session.Add("Client", myClient);
                        //ClientName = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single<uspGetBrokerByIDResult>().
                    }
                    catch (Exception ex)
                    {
                        Session.Abandon();
                        FormsAuthentication.SignOut();
                        Response.Redirect("Default.aspx", false);
                    }
                }

                else if (Session["BrokerID"] != null)
                {
                    Response.Redirect("~/BrokerAdmin/Welcome.aspx", true);
                }

                else
                {
                    Session.Abandon();
                    FormsAuthentication.SignOut();
                    Response.Redirect("Default.aspx", false);
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["ClientID"] != null)
            {
                Guid myClientID = (Guid)Session["ClientID"];
                try
                {
                    ElectronicAppDBDataContext        electronicAppDB        = new ElectronicAppDBDataContext();
                    ElectronicAppStorageDBDataContext electronicAppStorageDB = new ElectronicAppStorageDBDataContext();
                    uspGetClientByIDResult            myClient        = electronicAppDB.uspGetClientByID(myClientID).Single <uspGetClientByIDResult>();
                    uspGetClientContactResult         myClientContact = electronicAppDB.uspGetClientContact(myClient.ClientID).Single <uspGetClientContactResult>();
                    uspGetBrokerByIDResult            myBroker        = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single <uspGetBrokerByIDResult>();
                    uspGetBrokerContactResult         myBrokerInfo    = electronicAppDB.uspGetBrokerContact(myBroker.BrokerID).Single <uspGetBrokerContactResult>();
                    string ClientName = myClient.EmployerName;
                    //header.InnerHtml = "<span class=\"red\">Welcome</span> " + ClientName;
                    BrokerName.InnerHtml     = myBroker.FirstName + " " + myBroker.LastName;
                    BrokerEmail.InnerHtml    = myBrokerInfo.Email;
                    BrokerPhone.InnerHtml    = myBrokerInfo.PhoneNumber;
                    BrokerFax.InnerHtml      = myBrokerInfo.Fax;
                    BrokerAddress.InnerHtml  = myBrokerInfo.Address;
                    BrokerAddress2.InnerHtml = myBrokerInfo.City + ", " + myBrokerInfo.State + " " + myBrokerInfo.Zip;
                    Session.Add("Client", myClient);

                    uspGetBrokerByIDResult broker = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single <uspGetBrokerByIDResult>();

                    System.Collections.Generic.List <uspGetBrokerImageByOwnerIDResult> searches = electronicAppStorageDB.uspGetBrokerImageByOwnerID(broker.BrokerID).ToList <uspGetBrokerImageByOwnerIDResult>();

                    bool hasImage = searches.Count > 0;

                    if (hasImage)
                    {
                        Image1.ImageUrl = "/BrokerImages/Broker.ashx?id=" + broker.BrokerID.ToString();
                    }


                    //ClientName = electronicAppDB.uspGetBrokerByID(myClient.OwnerID).Single<uspGetBrokerByIDResult>().
                }
                catch (Exception ex)
                {
                    Session.Abandon();
                    FormsAuthentication.SignOut();
                    Response.Redirect("Default.aspx", false);
                }
            }
            else
            {
                BrokerInfo.Visible = false;
            }
            Session.Abandon();
            FormsAuthentication.SignOut();
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Guid myClientID = new Guid((String)(Session["clid"]));

                uspGetClientByIDResult    myClient        = eappdb.uspGetClientByID(myClientID).Single <uspGetClientByIDResult>();
                uspGetClientContactResult myClientContact = eappdb.uspGetClientContact(myClientID).Single <uspGetClientContactResult>();

                BrokerFirstName.Text = myClient.EmployerName;
                TaxID.Text           = myClient.TaxID;
                BrokerPhone.Text     = myClientContact.Phone;
                BrokerFax.Text       = myClientContact.Fax;
                BrokerAddress.Text   = myClientContact.Address;
                BrokerCity.Text      = myClientContact.City;
                BrokerState.Text     = myClientContact.state;
                BrokerZip.Text       = myClientContact.zip;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["BrokerID"] != null)
                {
                    Guid myBrokerID = (Guid)Session["BrokerID"];
                    try
                    {
                        if (Session["clid"] != null)
                        {
                            Guid myClientID = new Guid((String)Session["clid"]);

                            ElectronicAppDBDataContext electronicAppDB = new ElectronicAppDBDataContext();

                            uspGetClientByIDResult myClient = electronicAppDB.uspGetClientByID(myClientID).Single<uspGetClientByIDResult>();
                            uspGetClientContactResult myClientContact = electronicAppDB.uspGetClientContact(myClientID).Single<uspGetClientContactResult>();

                            if (myClient.OwnerID != myBrokerID)
                            {
                                Session.Abandon();
                                FormsAuthentication.SignOut();
                                Response.Redirect("~/Default.aspx?security=1", false);
                            }

                            header.InnerHtml = "<span class=\"red\">Client Applications</span> " + myClient.EmployerName;

                            BrokerName.InnerText = myClient.EmployerName;
                            BrokerPhone.InnerText = myClientContact.Phone;
                            BrokerAddress.InnerHtml = myClientContact.Address + "<br />" + myClientContact.City + ", " + myClientContact.state + " " + myClientContact.zip;
                            BrokerFax.InnerText = myClientContact.Fax;

                            List<uspGetSubmissionsByClientIDResult> mySubmissions = electronicAppDB.uspGetSubmissionsByClientID(myClient.ClientID).ToList<uspGetSubmissionsByClientIDResult>();
                            Boolean dark = false;
                            if (mySubmissions.Count <= 0)
                            {
                                HtmlTableRow newrow = new HtmlTableRow();
                                HtmlTableCell newcell = new HtmlTableCell();

                                newcell.InnerHtml = "There are no submissions to display.";
                                newrow.Cells.Add(newcell);
                                clients.Rows.Add(newrow);
                            }
                            else
                            {
                                HtmlTableRow row = new HtmlTableRow();

                                HtmlTableCell cell1 = new HtmlTableCell();
                                cell1.InnerHtml = "Date Submitted";
                                cell1.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell1.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell1.Width = "100px";

                                HtmlTableCell cell2 = new HtmlTableCell();
                                cell2.InnerHtml = "Enrollee Name";
                                cell2.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell2.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell2.Width = "200px";

                                HtmlTableCell cell3 = new HtmlTableCell();
                                cell3.InnerHtml = "Birth Date";
                                cell3.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell3.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell3.Width = "100px";

                                row.Cells.Add(cell2);
                                row.Cells.Add(cell3);
                                row.Cells.Add(cell1);
                                clients.Rows.Add(row);
                                dark = !dark;

                                foreach (uspGetSubmissionsByClientIDResult submission in mySubmissions)
                                {
                                    HtmlTableRow newrow = new HtmlTableRow();

                                    HtmlTableCell newcell1 = new HtmlTableCell();
                                    newcell1.InnerHtml = submission.AddedDate.ToShortDateString();
                                    newcell1.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    HtmlTableCell newcell2 = new HtmlTableCell();

                                    uspGetEnrolleeByIDResult myEnrollee = electronicAppDB.uspGetEnrolleeByID(submission.OwnerID).Single<uspGetEnrolleeByIDResult>();
                                    newcell2.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    newcell2.InnerHtml = myEnrollee.FirstName + " " + myEnrollee.LastName;
                                    HtmlTableCell newcell3 = new HtmlTableCell();
                                    newcell3.BgColor = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    newcell3.InnerHtml = myEnrollee.BirthDate;

                                    newrow.Cells.Add(newcell2);
                                    newrow.Cells.Add(newcell3);
                                    newrow.Cells.Add(newcell1);
                                    clients.Rows.Add(newrow);
                                    dark = !dark;
                                }
                            }
                        }
                        else
                        {
                            Session.Abandon();
                            FormsAuthentication.SignOut();
                            Response.Redirect("~/Default.aspx", false);
                        }
                    }
                    catch (Exception x)
                    {
                        Session.Abandon();
                        FormsAuthentication.SignOut();
                        Response.Redirect("~/Default.aspx", false);
                    }
                }
                else
                {
                    Session.Abandon();
                    FormsAuthentication.SignOut();
                    Response.Redirect("~/Default.aspx", false);
                }
            }
        }
Example #5
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);
        }
Example #6
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);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["BrokerID"] != null)
                {
                    Guid myBrokerID = (Guid)Session["BrokerID"];
                    try
                    {
                        if (Session["clid"] != null)
                        {
                            Guid myClientID = new Guid((String)Session["clid"]);

                            ElectronicAppDBDataContext electronicAppDB = new ElectronicAppDBDataContext();

                            uspGetClientByIDResult    myClient        = electronicAppDB.uspGetClientByID(myClientID).Single <uspGetClientByIDResult>();
                            uspGetClientContactResult myClientContact = electronicAppDB.uspGetClientContact(myClientID).Single <uspGetClientContactResult>();

                            if (myClient.OwnerID != myBrokerID)
                            {
                                Session.Abandon();
                                FormsAuthentication.SignOut();
                                Response.Redirect("~/Default.aspx?security=1", false);
                            }

                            header.InnerHtml = "<span class=\"red\">Client Applications</span> " + myClient.EmployerName;

                            BrokerName.InnerText    = myClient.EmployerName;
                            BrokerPhone.InnerText   = myClientContact.Phone;
                            BrokerAddress.InnerHtml = myClientContact.Address + "<br />" + myClientContact.City + ", " + myClientContact.state + " " + myClientContact.zip;
                            BrokerFax.InnerText     = myClientContact.Fax;


                            List <uspGetSubmissionsByClientIDResult> mySubmissions = electronicAppDB.uspGetSubmissionsByClientID(myClient.ClientID).ToList <uspGetSubmissionsByClientIDResult>();
                            Boolean dark = false;
                            if (mySubmissions.Count <= 0)
                            {
                                HtmlTableRow  newrow  = new HtmlTableRow();
                                HtmlTableCell newcell = new HtmlTableCell();

                                newcell.InnerHtml = "There are no submissions to display.";
                                newrow.Cells.Add(newcell);
                                clients.Rows.Add(newrow);
                            }
                            else
                            {
                                HtmlTableRow row = new HtmlTableRow();

                                HtmlTableCell cell1 = new HtmlTableCell();
                                cell1.InnerHtml           = "Date Submitted";
                                cell1.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell1.BgColor             = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell1.Width = "100px";

                                HtmlTableCell cell2 = new HtmlTableCell();
                                cell2.InnerHtml           = "Enrollee Name";
                                cell2.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell2.BgColor             = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell2.Width = "200px";

                                HtmlTableCell cell3 = new HtmlTableCell();
                                cell3.InnerHtml           = "Birth Date";
                                cell3.Attributes["Style"] = "border-bottom: 2px solid;";
                                cell3.BgColor             = (dark) ? "#CCCCCC" : "#FFFFFF";
                                cell3.Width = "100px";

                                row.Cells.Add(cell2);
                                row.Cells.Add(cell3);
                                row.Cells.Add(cell1);
                                clients.Rows.Add(row);
                                dark = !dark;

                                foreach (uspGetSubmissionsByClientIDResult submission in mySubmissions)
                                {
                                    HtmlTableRow newrow = new HtmlTableRow();

                                    HtmlTableCell newcell1 = new HtmlTableCell();
                                    newcell1.InnerHtml = submission.AddedDate.ToShortDateString();
                                    newcell1.BgColor   = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    HtmlTableCell newcell2 = new HtmlTableCell();

                                    uspGetEnrolleeByIDResult myEnrollee = electronicAppDB.uspGetEnrolleeByID(submission.OwnerID).Single <uspGetEnrolleeByIDResult>();
                                    newcell2.BgColor   = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    newcell2.InnerHtml = myEnrollee.FirstName + " " + myEnrollee.LastName;
                                    HtmlTableCell newcell3 = new HtmlTableCell();
                                    newcell3.BgColor   = (dark) ? "#CCCCCC" : "#FFFFFF";
                                    newcell3.InnerHtml = myEnrollee.BirthDate;

                                    newrow.Cells.Add(newcell2);
                                    newrow.Cells.Add(newcell3);
                                    newrow.Cells.Add(newcell1);
                                    clients.Rows.Add(newrow);
                                    dark = !dark;
                                }
                            }
                        }
                        else
                        {
                            Session.Abandon();
                            FormsAuthentication.SignOut();
                            Response.Redirect("~/Default.aspx", false);
                        }
                    }
                    catch (Exception x)
                    {
                        Session.Abandon();
                        FormsAuthentication.SignOut();
                        Response.Redirect("~/Default.aspx", false);
                    }
                }
                else
                {
                    Session.Abandon();
                    FormsAuthentication.SignOut();
                    Response.Redirect("~/Default.aspx", false);
                }
            }
        }