Пример #1
0
        private void btnNewOrganization_Click(object sender, EventArgs e)
        {
            int organizationID = OrganizationForm.ShowOrganization();

            if (organizationID > -1)
            {
                LoadOrganizations();
                SelectOrganization(organizationID);
            }
        }
Пример #2
0
        public static int ShowOrganization(int organizationID)
        {
            OrganizationForm form = new OrganizationForm();

            form._organizationID = organizationID;

            if (form.ShowDialog() == DialogResult.OK)
            {
                return(form._organizationID);
            }
            else
            {
                return(-1);
            }
        }
Пример #3
0
 private void btnEditOrganization_Click(object sender, EventArgs e)
 {
     OrganizationForm.ShowOrganization((int)((NamObjectItem)cmbOrganization.SelectedItem).Value);
     LoadOrganization((int)((NamObjectItem)cmbOrganization.SelectedItem).Value);
 }