コード例 #1
0
 private void btn_seleccionar_Click(object sender, EventArgs e)
 {
     if (this.dgv_roles.DisplayedRowCount(true) == 0)
     {
         MessageBox.Show("Seleccione un rol de la lista", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         Rol rol = new Rol((int)this.dgv_roles.SelectedRows[0].Cells[0].Value,
                           this.dgv_roles.SelectedRows[0].Cells[1].Value.ToString(),
                           (bool)(this.dgv_roles.SelectedRows[0].Cells[2].Value.Equals("Sí")));
         this.Close();
         AbmRol modificar = new AbmRol(rol);
         modificar.ShowDialog();
     }
 }
コード例 #2
0
        private void btn_crear_Click(object sender, EventArgs e)
        {
            AbmRol crear = new AbmRol();

            crear.ShowDialog();
        }