当前位置: 首页>>代码示例>>C#>>正文


C# DataLayer.GetAllResources方法代码示例

本文整理汇总了C#中DataLayer.GetAllResources方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.GetAllResources方法的具体用法?C# DataLayer.GetAllResources怎么用?C# DataLayer.GetAllResources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataLayer的用法示例。


在下文中一共展示了DataLayer.GetAllResources方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmResources

            /// <summary>
            /// Constructor with assembly path parameter to find all the RBAC resources used in the assembly
            /// </summary>
            /// <param name="pAssemblyPath"></param>
            public frmResources(DataLayer pRbacd, string pAssemblyPath)
            {
                Rbacd = pRbacd;
                if ((!SecurityPrincipal.IsRBACInitialized) && (SecurityPrincipal.IsRBACAuthenticated)) { throw new Exception("RBAC system is not activated..."); } // Check if the RBAC systm is initialize or not
                if (pRbacd == null) { throw new Exception("RBAC data layer is not activated"); } //Check RBAC datalayer is valid or not
                if (!File.Exists(pAssemblyPath)) { throw new Exception("Assembly not found"); } //Check that provided assembly path is valid or not
                sRoleList = Rbacd.GetAllRoles();
                sResourceList = Rbacd.GetAllResources();
                assemblyPath = pAssemblyPath;
                if ((sRoleList == null) || (sRoleList.Count == 0)) { throw new Exception("Role table is not ready"); }
                Rbacd = pRbacd;//Initialize a member variable
                InitializeComponent();

                Bitmap bmp = Resources.Blue4;
                this.BackgroundImage = (Image)bmp;
                grpResources.BackgroundImage = (Image)bmp;
                grpForms.BackgroundImage = (Image)bmp;
            }
开发者ID:namatitiben,项目名称:nknight,代码行数:22,代码来源:frmResources.cs

示例2: frmResourceRoleMapping

            public frmResourceRoleMapping(DataLayer pRbacd, string pAssemblyPath)
            {
                Rbacd = pRbacd;
                assemblyPath = pAssemblyPath;
                if ((!SecurityPrincipal.IsRBACInitialized) && (SecurityPrincipal.IsRBACAuthenticated)) { throw new Exception("RBAC system is not activated..."); } // Check if the RBAC systm is initialize or not
                if (pRbacd == null) { throw new Exception("RBAC data layer is not activated"); } //Check RBAC datalayer is valid or not
                sRoleList = Rbacd.GetAllRoles();
                sResourceList = Rbacd.GetAllResources();
                if ((sRoleList == null) || (sRoleList.Count == 0)) { throw new Exception("Role table is not ready"); }
                InitializeComponent();
                if ((sResourceList == null) || (sResourceList.Count == 0)) { shouldClose = true; }
                Bitmap bmp = Resources.Blue4;

                //lvwResources.BackgroundImage = (Image)bmp;
                //lvwRoles.BackgroundImage = (Image)bmp;
                this.BackgroundImage = (Image)bmp;
                grpResources.BackgroundImage = (Image)bmp;
                grpRoles.BackgroundImage = (Image)bmp;
            }
开发者ID:namatitiben,项目名称:nknight,代码行数:19,代码来源:frmResourceRoleMapping.cs


注:本文中的DataLayer.GetAllResources方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。