예제 #1
0
        private void executeNuevo()
        {
            FormEgresoNuevo egresoNuevo = new FormEgresoNuevo();

            egresoNuevo.ShowDialog();
            cargarRegistros();
        }
예제 #2
0
        private void executeNuevo()
        {
            loadCajaSesion();
            FormEgresoNuevo egresoNuevo = new FormEgresoNuevo();

            egresoNuevo.ShowDialog();
            cargarRegistros();
        }
예제 #3
0
        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 idEgreso = Convert.ToInt32(dataGridView.Rows[index].Cells[0].Value); // obteniedo el idRegistro del datagridview

            currentEgreso = egresos.Find(x => x.idEgreso == idEgreso);               // Buscando la registro especifico en la lista de registros

            // Mostrando el formulario de modificacion
            FormEgresoNuevo formEgreso = new FormEgresoNuevo(currentEgreso);

            formEgreso.ShowDialog();
            cargarRegistros(); // recargando loas registros en el datagridview
        }