Ejemplo n.º 1
0
 private void button_Accept_Click(object sender, EventArgs e)
 {
     if (label_ShowTotalAmountOfPayment.Visible)
     {
         pricingPolicy.Premium      = Convert.ToDouble(label_ShowTotalAmountOfPayment.Text);
         pricingPolicy.StartDate    = DateTime.Today;
         pricingPolicy.Holder.ID    = pricingPolicy.Holder.getNextId();
         pricingPolicy.PolicyNumber = pricingPolicy.getNextNumber();
         AddPolicy addPolicy = new AddPolicy(pricingPolicy, usingAgent, this);
         addPolicy.Show();
         this.Hide();
     }
     else
     {
         PriceButtonWarning priceFirst = new PriceButtonWarning(true);
         priceFirst.Show();
     }
 }
Ejemplo n.º 2
0
 public AddPolicyMakeSure(bool forSave, Policy policy, AddPolicy addPolicy, Agent inUsingAgent, PricePolicy pricePolicy)
 {
     InitializeComponent();
     completePolicy  = policy;
     previousPage    = addPolicy;
     usingAgent      = inUsingAgent;
     prepreviousPage = pricePolicy;
     if (forSave)
     {
         label_CancelWarning.Visible = false;
         pictureBox_Warning.Visible  = false;
         button_Yes.Visible          = false;
         button_No.Visible           = false;
     }
     else
     {
         label_SaveMakeSure.Visible = false;
         button_Save.Visible        = false;
         button_Cancel.Visible      = false;
     }
 }