Esempio n. 1
0
        private void btnAddPerson_Click(object sender, EventArgs e)
        {
            PersonForm form = PersonForm.GetInstance(PersonForm.FormType.ADDITION);

            form.FormClosing += OnFormClosing;

            if (!form.Visible)
            {
                form.Show();
            }
            else
            {
                form.BringToFront();
            }
        }
Esempio n. 2
0
        private void dgvOverview_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            PersonForm form = PersonForm.GetInstance(PersonForm.FormType.MODIFICATION, int.Parse(dgvOverview.Rows[e.RowIndex].Cells["colOverPersonID"].Value.ToString()));

            form.FormClosing += OnFormClosing;

            if (!form.Visible)
            {
                form.Show();
            }
            else
            {
                form.BringToFront();
            }
        }