private void AddEmployeeButton_Click(object sender, EventArgs e) { AddEmployee form = new AddEmployee(); form.FormClosed += (s, args) => BindData(); form.Show(); }
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(); }