private void btnNewOrganization_Click(object sender, EventArgs e) { int organizationID = OrganizationForm.ShowOrganization(); if (organizationID > -1) { LoadOrganizations(); SelectOrganization(organizationID); } }
public static int ShowOrganization(int organizationID) { OrganizationForm form = new OrganizationForm(); form._organizationID = organizationID; if (form.ShowDialog() == DialogResult.OK) { return(form._organizationID); } else { return(-1); } }
private void btnEditOrganization_Click(object sender, EventArgs e) { OrganizationForm.ShowOrganization((int)((NamObjectItem)cmbOrganization.SelectedItem).Value); LoadOrganization((int)((NamObjectItem)cmbOrganization.SelectedItem).Value); }