private void btnGuardarHistorial_Click(object sender, EventArgs e) { try { string aaa = ""; PericiaHistoriaWF periciaForm = new PericiaHistoriaWF(aaa); periciaForm.Enabled = false; Entidades.Pericias _pericia = CargarEntidad(); bool Exito = PericiaNeg.GurdarHistorialPericia(_pericia); if (Exito == true) { ProgressBar(); const string message2 = "Se registro el nuevo estadio exitosamente."; const string caption2 = "Éxito"; var result2 = MessageBox.Show(message2, caption2, MessageBoxButtons.OK, MessageBoxIcon.Asterisk); LimpiarCampos(); ListaPericias = PericiaNeg.BuscarHistorialPericia(idPericiaSeleccionada); groupBox2.Visible = false; btnNuevaHistoria.Visible = true; btnVolver.Visible = true; periciaForm.Enabled = true; } else { } } catch (Exception ex) { } }
private void ClickBoton(object sender, DataGridViewCellEventArgs e) { if (dgvPericias.CurrentCell.ColumnIndex == 22) { var idPericia = Convert.ToString(this.dgvPericias.CurrentRow.Cells[0].Value); PericiaHistoriaWF _vista = new PericiaHistoriaWF(idPericia); _vista.Show(); Hide(); } }