private static void SetSYS_RolesInfo(DbDataReader reader, ref SYS_Roles sys_roles)
        {
            sys_roles.ID             = int.Parse("0" + reader[FIELD_ID]);
            sys_roles.Name           = "" + reader[FIELD_NAME];
            sys_roles.IDOrganization = int.Parse("0" + reader[FIELD_IDORGANIZATION]);
            SYS_RightDataAccess sysRightDataAccess = new SYS_RightDataAccess();

            sys_roles.Right = sysRightDataAccess.GetRightsByRole(sys_roles);
        }
Exemple #2
0
        private static void SetListSYS_RolesInfoAll(ref DbDataReader reader, ref List <SYS_Roles> sys_roless)
        {
            SYS_Roles           sys_roles          = null;
            SYS_RightDataAccess sysRightDataAccess = new SYS_RightDataAccess();

            while (reader.Read())
            {
                sys_roles = new SYS_Roles();
                SYS_RolesDataAccess.SetSYS_RolesInfo(reader, ref sys_roles);
                sys_roles.Right = sysRightDataAccess.GetRightsByRole(sys_roles);
                sys_roless.Add(sys_roles);
            }
        }