private IList <MenuDTO> GetMenu() { grdMenu.BlockUI(false); IList <MenuDTO> lLstObjResult = null; try { SecurityServicesFactory mObjSecurityServiceFactory = new SecurityServicesFactory(); SessionDTO lObjSession = StaticSessionUtility.GetCurrentSession() as SessionDTO; if (IsActiveSecurity() || !IsTestMode()) { lLstObjResult = mObjSecurityServiceFactory.GetPermissionService().GetSystemMenu(lObjSession.Id); } else { lLstObjResult = mObjSecurityServiceFactory.GetPermissionService().GetTestSystemMenu(); } } catch (Exception lObjException) { this.Dispatcher.Invoke(() => { CustomMessageBox.Show("Error", lObjException.Message); }); } finally { grdMenu.UnblockUI(); } return(lLstObjResult); }
private bool GetActiveSession() { SessionDTO lObjCurrentSession = (SessionDTO)StaticSessionUtility.GetCurrentSession(); if (lObjCurrentSession != null) { UserDTO pObjUserDto = mObjUserFactory.GetUserService().GetUserDTO(lObjCurrentSession.Id); if (pObjUserDto.UserType.Equals("Administrador")) { return(true); } else { return(false); } } else { return(false); } }
private long GetCurrentUserId() { return(((SessionDTO)StaticSessionUtility.GetCurrentSession()).Id); }