Exemplo n.º 1
0
        private void executeNuevo()
        {
            FormNotaSalidaNew formNotaSalida = new FormNotaSalidaNew();

            formNotaSalida.ShowDialog();
            this.reLoad();
        }
Exemplo n.º 2
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 idNotaSalida = Convert.ToInt32(dataGridView.Rows[index].Cells[0].Value); // obteniedo el idRegistro del datagridview

            currentNotaSalida = notaSalidas.Find(x => x.idNotaSalida == idNotaSalida);   // Buscando la registro especifico en la lista de registros

            // Mostrando el formulario de modificacion
            FormNotaSalidaNew formPuntoVenta = new FormNotaSalidaNew(currentNotaSalida);

            formPuntoVenta.ShowDialog();
            this.reLoad(); // Recargando los registros
        }