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(); }
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 { } }