private void Btn_agregar_Click(object sender, EventArgs e) { FrmABMEquipo frmABMEquipo = new FrmABMEquipo(); AddOwnedForm(frmABMEquipo); frmABMEquipo.ShowDialog(); }
private void Btn_editar_Click(object sender, EventArgs e) { if (dgw_equipo.CurrentRow != null) { FrmABMEquipo frmABMEquipo = new FrmABMEquipo(); int selected = Int32.Parse(dgw_equipo.CurrentRow.Cells["id_equipo_col"].Value.ToString()); frmABMEquipo.determinarOperacion(FrmABMEquipo.FormMode.update, selected); AddOwnedForm(frmABMEquipo); frmABMEquipo.ShowDialog(); } else { MessageBox.Show("Primero debe seleccionar un registro!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } }