Exemplo n.º 1
0
        /// <summary>
        /// 获取权限范围的设置
        /// </summary>
        /// <param name="organizeIds">有权限的组织机构</param>
        /// <returns>权限范围</returns>
        public static PermissionScope GetPermissionScope(string[] organizeIds)
        {
            return(((PermissionScope[])Enum.GetValues(typeof(PermissionScope))).FirstOrDefault(permissionScope => BusinessLogic.Exists(organizeIds, permissionScope.ToString())));

            //PermissionScope returnValue = PermissionScope.None;
            //foreach (PermissionScope permissionScope in (PermissionScope[])Enum.GetValues(typeof(PermissionScope)))
            //{
            //    if (BusinessLogic.Exists(organizeIds, permissionScope.ToString()))
            //    {
            //        returnValue = permissionScope;
            //        break;
            //    }
            //}
            //return returnValue;
        }
        /// <summary>
        /// 从当前指定的语系包读取信息,用了反射循环遍历
        /// </summary>
        /// <returns></returns>
        public static int GetLanguageResource()
        {
            RDIFrameworkMessage RDIFrameworkMessage = new RDIFrameworkMessage();

            return(BusinessLogic.GetLanguageResource(RDIFrameworkMessage));
        }