private void btNewEmp_Click(object sender, EventArgs e) { var empform = new NewEmpleado(); empform.Closed += empform_Closed; empform.ShowDialog(); }
private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { var empform = new NewEmpleado(); empform.Closed += empform_Closed; var emp = dataGridView1.Rows[e.RowIndex].DataBoundItem as empleado; empform.ShowEmpleado(emp); empform.ShowDialog(); }