private void AddOrganization() { var organization = new Organization(); var organizationForm = new CreateOrganization(ref organization); organizationForm.ShowDialog(); }
private void BtnEditOrganization_Click(object sender, EventArgs e) { var organization = (Organization)TvOrganization.SelectedObject; if (organization == null) { MessageBox.Show(@"Please select an organization"); return; } var editOrganization = new CreateOrganization(ref organization); editOrganization.ShowDialog(); TvOrganization.UpdateObject(organization); }