public static qPtl_Permissions GetUserPermissions(int data_group_id, int reference_id, int user_id)
        {
            qPtl_Permissions permissions = new qPtl_Permissions();

            permissions.container.Select(new DbQuery
            {
                Where = string.Format("DataGroupID = {0} AND ReferenceID = {1} AND AppliesTo = 'User' AND AppliesToID = {2}", data_group_id, reference_id, user_id)
            });

            if (permissions.PermissionID > 0)
            {
                return(permissions);
            }
            else
            {
                return(null);
            }
        }
        public static qPtl_Permissions GetUserPermissions(int data_group_id, int reference_id, int user_id)
        {
            qPtl_Permissions permissions = new qPtl_Permissions();

            permissions.container.Select(new DbQuery
            {
                Where = string.Format("DataGroupID = {0} AND ReferenceID = {1} AND AppliesTo = 'User' AND AppliesToID = {2}", data_group_id, reference_id, user_id)
            });

            if (permissions.PermissionID > 0) return permissions;
            else return null;
        }