Пример #1
0
        private void AddEmployeeButton_Click(object sender, EventArgs e)
        {
            AddEmployee form = new AddEmployee();

            form.FormClosed += (s, args) => BindData();
            form.Show();
        }
Пример #2
0
        private void EditToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddEmployee form = new AddEmployee(dataGridView1.CurrentRow.Cells[0].Value.ToString(), dataGridView1.CurrentRow.Cells[1].Value.ToString(),
                                               dataGridView1.CurrentRow.Cells[2].Value.ToString(), dataGridView1.CurrentRow.Cells[3].Value.ToString(), dataGridView1.CurrentRow.Cells[4].Value.ToString(),
                                               dataGridView1.CurrentRow.Cells[5].Value.ToString(), dataGridView1.CurrentRow.Cells[6].Value.ToString(), dataGridView1.CurrentRow.Cells[7].Value.ToString(),
                                               dataGridView1.CurrentRow.Cells[8].Value.ToString());

            form.FormClosed += (s, args) => BindData();
            form.Show();
        }