Beispiel #1
0
        private void DirectorFormDisposeEvent(object sender, EventArgs e)
        {
            DirectorForm form = (DirectorForm)sender;

            if (form.CorrectOnClose)
            {
                Person person = form.Person;
                director = new Director(person, null, form.Signature, form.Salary)
                {
                    PendingDocuments = new List <Document>()
                };
            }
        }
Beispiel #2
0
        private void DirectorChooseEvent(object sender, EventArgs e)
        {
            ComboBox personsBox = (ComboBox)Utils.FindControl(this, "personsBox");

            if (personsBox.SelectedItem == null)
            {
                MessageBox.Show("Персона не выбрана!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                Person       person       = (Person)personsBox.SelectedItem;
                DirectorForm employeeForm = new DirectorForm(person);
                employeeForm.Disposed += new EventHandler(DirectorDisposeEvent);
                employeeForm.Activate();
                employeeForm.ShowDialog();
            }
        }