private void Btn_editar_Click(object sender, EventArgs e) { if (dgw_fecha_torneo.CurrentRow != null) { switch (determinarModo(modo)) { case "fecha": fechaService.selected = Int32.Parse(dgw_fecha_torneo.CurrentRow.Cells["id_col"].Value.ToString()); FrmABMFixture frmABMFixtureFecha = new FrmABMFixture(modo, 2, fechaService); frmABMFixtureFecha.ShowDialog(); break; case "torneo": torneoService.selected = Int32.Parse(dgw_fecha_torneo.CurrentRow.Cells["id_col"].Value.ToString()); FrmABMFixture frmABMFixtureTorneo = new FrmABMFixture(modo, 2, torneoService); frmABMFixtureTorneo.ShowDialog(); break; } } else { MessageBox.Show("Primero debe seleccionar un registro!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } dgw_fecha_torneo.Rows.Clear(); }
private void Btn_agregar_Click(object sender, EventArgs e) { FrmABMFixture frmABMFixture = new FrmABMFixture(modo, 1); frmABMFixture.ShowDialog(); dgw_fecha_torneo.Rows.Clear(); }