private void списокОрганизацийToolStripMenuItem_Click(object sender, EventArgs e) { using (var organizationsForm = new OrganizationsListForm(LookupMode: false)) { organizationsForm.ShowDialog(); if (organizationsForm.OrganizationsListChanged) { FillCertificatesTable(); } } }
private void AddOrganizationBtn_Click(object sender, EventArgs e) { using (var organizationsFrom = new OrganizationsListForm(LookupMode: true)) { if (organizationsFrom.ShowDialog() == DialogResult.OK) { FillOrganizationComboBox(); OrganizationComboBox.SelectedIndex = OrganizationComboBox.Items.IndexOf((OrganizationComboBox.DataSource as List <Organization>) .Find(o => o.OrganizationId == organizationsFrom.CurrentOrganization.OrganizationId)); } } }