Exemple #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            WorkerEditForm addForm = new WorkerEditForm();

            addForm.TopLevel     = false;
            addForm.MdiParent    = (MainForm)Parent.Parent;
            addForm.FormClosing += AddEditForm_FormClosing;;
            addForm.Show();
        }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int            index          = int.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString());
            WorkerEditForm editWorkerForm = new WorkerEditForm(index);

            editWorkerForm.TopLevel     = false;
            editWorkerForm.MdiParent    = (MainForm)Parent.Parent;
            editWorkerForm.FormClosing += AddEditForm_FormClosing;
            editWorkerForm.Show();
        }