Ejemplo n.º 1
0
        private void btnAddNewCompany_Click(object sender, EventArgs e)
        {
            frmParty frm = new frmParty("C");

            if (frm.ShowDialog() == DialogResult.OK)
            {
                PopulateCompaniesDropdown();
                cboCompanies.SelectedItem = ((List <SelectListItem>)cboCompanies.DataSource).Where(x => x.ID == frm.SelectedID).FirstOrDefault();
            }
        }
Ejemplo n.º 2
0
 private void btnAddAgency_Click(object sender, EventArgs e)
 {
     try
     {
         frmParty frm = new frmParty("A");
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateAgenciesDropdown();
             cboAgencies.SelectedItem = ((List <SelectListItem>)cboAgencies.DataSource).Where(x => x.ID == frm.SelectedID).FirstOrDefault();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "btnAddAgency_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }