public void EditRolDeletePrivilegioBtn_Click() { try { string loggeduser = this.LoggedUserHdn.Text; RolLogic rollogic = new RolLogic(); int rol_id = Convert.ToInt32(this.EditIdTxt.Text); List <int> privs = new List <int>(); foreach (SelectedRow row in this.PrivilegiosDeRolSelectionM.SelectedRows) { privs.Add(Convert.ToInt32(row.RecordID)); } rollogic.EliminarPrivilegios(rol_id, privs, loggeduser); this.PrivilegiosDeRolSelectionM.ClearSelections(); } catch (Exception ex) { log.Fatal("Error fatal al eliminar privilegios de rol.", ex); throw; } }
public static List <BERolAux> ListaRol(string pCodSistema) { List <BERolAux> listaRol = new List <BERolAux>(); listaRol = new RolLogic().List(string.Empty, pCodSistema, string.Empty, true, Helper.ComboBoxText.Select); return(listaRol); }
private void InitializeForm() { _rolLogic = new RolLogic(); _funcLogic = new FuncionalidadLogic(); // Seteo las funcionalidades disponibles Dictionary <int, String> funcs = _funcLogic.GetAll().ToDictionary(p => p.ID, p => p.Name); ChkLstFuncionalidades.DataSource = new BindingSource(funcs, null); ChkLstFuncionalidades.DisplayMember = "Value"; ChkLstFuncionalidades.ValueMember = "Key"; }
public Home(Usuario usuario) { _usuario = usuario; rolLogic = new RolLogic(); InitializeComponent(); List <Rol> roles = rolLogic.GetAll(); _roles = roles.ToDictionary(p => p.ID, p => p); cmbRoles.DataSource = new BindingSource(roles.ToDictionary(p => p.ID, p => p.Name), null); cmbRoles.DisplayMember = "Value"; cmbRoles.ValueMember = "Key"; }
public ModificacionRol() { InitializeComponent(); _rolesLogic = new RolLogic(); _funcLogic = new FuncionalidadLogic(); // Seteo las funcionalidades disponibles Dictionary <int, String> funcs = _funcLogic.GetAll().ToDictionary(p => p.ID, p => p.Name); ChkLstFuncionalidades.DataSource = new BindingSource(funcs, null); ChkLstFuncionalidades.DisplayMember = "Value"; ChkLstFuncionalidades.ValueMember = "Key"; }
protected void PrivilegiosDeRolSt_Refresh(object sender, StoreRefreshDataEventArgs e) { try { int rol_id = string.IsNullOrEmpty(this.EditIdTxt.Text) ? 0 : Convert.ToInt32(this.EditIdTxt.Text); RolLogic rollogic = new RolLogic(); int priv_id = string.IsNullOrEmpty(this.f_PRIV_ID.Text) ? 0 : Convert.ToInt32(this.f_PRIV_ID.Text); this.PrivilegiosDeRolSt.DataSource = rollogic.GetPrivilegios(rol_id, priv_id, this.f_PRIV_NOMBRE.Text, this.f_PRIV_LLAVE.Text); this.PrivilegiosDeRolSt.DataBind(); } catch (Exception ex) { log.Fatal("Error fatal al cargar privilegios de rol.", ex); throw; } }
public static void LoadOnInit() { roles = RolLogic.GetAllActivos(NHibernateManager.GetInstance().SessionInicioAplicacion); }
public BajaRol() { InitializeComponent(); _rolLogic = new RolLogic(); }