private void executeNuevo() { FormEntradaNew formNotaEntrada = new FormEntradaNew(); formNotaEntrada.ShowDialog(); this.reLoad(); }
private void executeModificar() { // Verificando la existencia de datos en el datagridview if (dataGridView.Rows.Count == 0) { MessageBox.Show("No hay un registro seleccionado", "Eliminar", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } int index = dataGridView.CurrentRow.Index; // Identificando la fila actual del datagridview int idNotaEntrada = Convert.ToInt32(dataGridView.Rows[index].Cells[0].Value); // obteniedo el idRegistro del datagridview currentNotaEntrada = notaEntradas.Find(x => x.idNotaEntrada == idNotaEntrada); // Buscando la registro especifico en la lista de registros //// Mostrando el formulario de modificacion FormEntradaNew formNotaEntrada = new FormEntradaNew(currentNotaEntrada); formNotaEntrada.ShowDialog(); this.reLoad(); // Recargando los registros }