private void nuevoPerfilToolStripMenuItem_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; using (var frm = new frmMntPerfilUsuario(PerfilUsuario.NewPerfilUsuario())) if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { CargarPerfiles(tvwAplicaciones.SelectedNode.Name); } } catch (DataPortalException ex) { XtraMessageBox.Show(ex.BusinessException.Message, "Nuevo Perfil de Usuario", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Nuevo Perfil de Usuario", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { Cursor.Current = Cursors.Default; } }
private void editarPerfilToolStripMenuItem_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; var current = perfilUsuarioInfoListBindingSource.Current as PerfilUsuarioInfo; if (current == null) { return; } Clipboard.SetText(current.ID); using (var frm = new frmMntPerfilUsuario(PerfilUsuario.GetPerfilUsuario(current.ID))) if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { CargarPerfiles(tvwAplicaciones.SelectedNode.Name); } } catch (DataPortalException ex) { XtraMessageBox.Show(ex.BusinessException.Message, "Editar Perfil de Usuario", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Editar Perfil de Usuario", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { Cursor.Current = Cursors.Default; } }