Example #1
0
        private void btnAddGrupoCliente_Click(object sender, EventArgs e)
        {
            FormGrupoClienteNuevo formGrupoCliente = new FormGrupoClienteNuevo();

            formGrupoCliente.ShowDialog();
            cargarGrupoCliente();
        }
Example #2
0
        private void executeNuevo()
        {
            FormGrupoClienteNuevo clienteNuevo = new FormGrupoClienteNuevo();

            clienteNuevo.ShowDialog();
            this.reLoad();
        }
Example #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 idGrupoCliente = Convert.ToInt32(dataGridView.Rows[index].Cells[0].Value);     // obteniedo el idRegistro del datagridview

            currentGrupoCliente = grupoClientes.Find(x => x.idGrupoCliente == idGrupoCliente); // Buscando la registro especifico en la lista de registros

            // Mostrando el formulario de modificacion
            FormGrupoClienteNuevo formGrupoCliente = new FormGrupoClienteNuevo(currentGrupoCliente);

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