private void BTNnuevo_Click(object sender, EventArgs e) { FRMRol formularioNuevoRol = new FRMRol(); formularioNuevoRol.altaDeRolActivada(); formularioNuevoRol.Show(); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { if (e.ColumnIndex == dataGridView1.Columns["Editar"].Index) { DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; FRMRol formularioRol = new FRMRol(); formularioRol.recibirDatosRol(Convert.ToInt16(row.Cells[0].Value), Convert.ToString(row.Cells[1].Value), Convert.ToString(row.Cells[2].Value)); formularioRol.Show(); } if (e.ColumnIndex == dataGridView1.Columns["Eliminar"].Index) { DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; Rol unRol = new Rol(Convert.ToInt16(row.Cells[0].Value), Convert.ToString(row.Cells[1].Value), "Inactivo"); unRol.modificate(); this.busquedaDeValores(); } } }