Esempio n. 1
0
        public UpdatePolicy(Agent inUsingAgent, PolicyPage policy, Policy usingPolicy, Search theSearchPage)
        {
            InitializeComponent();
            usingAgent   = inUsingAgent;
            previousPage = policy;
            inPolicy     = usingPolicy;
            searchPage   = theSearchPage;
            //Labels, textBoxes, and comboBox are filled with the original info.
            label_ShowPolicyNumber.Text        = inPolicy.PolicyNumber;
            textBox_PolicyholderFirstName.Text = inPolicy.Holder.FirstName;
            textBox_PolicyholderLastName.Text  = inPolicy.Holder.LastName;
            textBox_AddressStreet.Text         = inPolicy.Holder.Street;
            textBox_AddressCity.Text           = inPolicy.Holder.City;
            comboBox_AddressState.Text         = inPolicy.Holder.State;
            textBox_AddressZip.Text            = inPolicy.Holder.ZIP;
            label_ShowPolicyholderDOB.Text     = inPolicy.Holder.BirthDate.ToString("yyyy/MM/dd");

            if (Convert.ToString(inPolicy.FathersAgeAtDeath) != "0")
            {
                label_ShowFatherAAD.Text = Convert.ToString(inPolicy.FathersAgeAtDeath);
            }

            if (Convert.ToString(inPolicy.MothersAgeAtDeath) != "0")
            {
                label_ShowMotherAAD.Text = Convert.ToString(inPolicy.MothersAgeAtDeath);
            }


            label_ShowSmokingHistory.Text        = Convert.ToString(inPolicy.SmokingHis);
            label_ShowCigPerDay.Text             = Convert.ToString(inPolicy.CigsPerDay);
            label_ShowSystolicBloodPressure.Text = Convert.ToString(inPolicy.SystolicBldPressure);
            label_ShowAverageFatPerDay.Text      = Convert.ToString(inPolicy.GramsFatPerDay);
            label_ShowHeartDisease.Text          = convertBool(inPolicy.HeartDisease);
            label_ShowCancer.Text      = convertBool(inPolicy.Cancer);
            label_ShowHospitaized.Text = convertBool(inPolicy.Hospitalized);

            if (inPolicy.DangerousActivities != "")
            {
                label_ShowDangerousActivity.Text = inPolicy.DangerousActivities;
            }

            label_ShowPolicyStartDate.Text = inPolicy.StartDate.ToString("yyyy/MM/dd");

            if (inPolicy.EndDate.ToString("yyyy/MM/dd") != "0001/01/01")
            {
                label_ShowPolicyEndDate.Text = inPolicy.EndDate.ToString("yyyy/MM/dd");
            }

            label_ShowAgentNumber.Text        = inPolicy.RepresentativeAgent.ID;
            label_ShowAgentFirstName.Text     = inPolicy.RepresentativeAgent.Firstname;
            label_ShowAgentLastName.Text      = inPolicy.RepresentativeAgent.Lastname;
            label_ShowPayoffAmount.Text       = "$" + Convert.ToString(inPolicy.PayOffAmount);
            label_ShowMonthlyPremium.Text     = "$" + Convert.ToString(inPolicy.Premium);
            textBox_BeneficiaryFirstName.Text = inPolicy.Beneficiary.FirstName;
            textBox_BeneficiaryLastName.Text  = inPolicy.Beneficiary.LastName;
        }
Esempio n. 2
0
 public MakeClaim(Search search, Policy inPolicy, PolicyPage inPage, Agent agent)
 {
     InitializeComponent();
     goBack                   = search;
     usingPolicy              = inPolicy;
     previousPage             = inPage;
     label_profitMade.Visible = false;
     button_Ok.Visible        = false;
     usingAgent               = agent;
 }
Esempio n. 3
0
        private void button_Save_Click(object sender, EventArgs e)
        {
            usingPolicy.AddPolicyInfo(phFirstName, phLastName, street, city, state, zIP, benefFirstName, benefLastName);
            PolicyPage policy = new PolicyPage(usingAgent, searchPage, usingPolicy);

            policy.Show();
            SuccessPage success = new SuccessPage();

            success.Show();
            this.Close();
            previousPage.Close();
        }
Esempio n. 4
0
        private void listBox_Searching_SelectedIndexChanged(object sender, EventArgs e)
        {
            int    index = listBox_Searching.SelectedIndex;
            Policy policy;

            try
            {
                policy = policyList.ElementAt(index);
                PolicyPage policyPage = new PolicyPage(usingAgent, this, policy);
                policyPage.Show();
                this.Hide();
            }
            catch { }
        }
Esempio n. 5
0
 public LossWarning(double profit, PolicyPage inPage, MakeClaim claim)
 {
     InitializeComponent();
     prepreviousPage = inPage;
     previousPage    = claim;
     if (profit > -5.0)
     {
         label_WarningComment1.Text = "A loss of" + (-profit) + " percent has been detected";
         label_MoreLoss1.Visible    = false;
         label_MoreLoss2.Visible    = false;
     }
     else
     {
         label_MoreLoss1.Text          = "A loss of " + (-profit) + " percent has been detected";
         label_WarningComment1.Visible = false;
         label_WarningComment2.Visible = false;
     }
 }
Esempio n. 6
0
        public PaymentHistory(PolicyPage inPage, Policy thePolicy)
        {
            InitializeComponent();
            previousePage                   = inPage;
            label_ShowPolicyNum.Text        = thePolicy.PolicyNumber;
            label_ShowPolicyholderName.Text = thePolicy.Holder.FirstName + " " + thePolicy.Holder.LastName;
            List <PAG340MiddleWare.Payment> paymentHistory = thePolicy.GetPaymentHistory();

            foreach (Payment payment in paymentHistory)
            {
                string listString = alignItemString(payment);
                listBox_PaymentHiotory.Items.Add(listString);
            }

            if (listBox_PaymentHiotory.Items.Count == 0)
            {
                listBox_PaymentHiotory.Items.Add("There is no result.");
            }
        }
Esempio n. 7
0
 private void button_Ok_Click(object sender, EventArgs e)
 {
     this.Close();
     previousPage.Close();
     PolicyPage newPage = new PolicyPage(usingAgent, goBack, usingPolicy);
 }
Esempio n. 8
0
 public CancelPolicy(Policy thePolicy, PolicyPage policyPage)
 {
     InitializeComponent();
     inPolicy     = thePolicy;
     previousPage = policyPage;
 }
Esempio n. 9
0
 public UpdateUnsave(PolicyPage inPage, UpdatePolicy updates)
 {
     InitializeComponent();
     prepreviousPage = inPage;
     previousPage    = updates;
 }