示例#1
0
        private void dgvClientes_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                DataGridView dataGridView = sender as DataGridView;

                if (dataGridView.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
                {
                    if (e.ColumnIndex == 6)
                    {
                        // EDITAR
                        string documento = dataGridView.Rows[e.RowIndex].Cells[0].Value.ToString();

                        GestionCliente gestionCliente = new GestionCliente(documento);
                        gestionCliente.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#2
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            GestionCliente gestionCliente = new GestionCliente();

            gestionCliente.ShowDialog();
        }