コード例 #1
0
        public static WebContent GetWebContent(int webContentID)
        {
            if (webContentID == 0)
            {
                return(null);
            }

            WebContentCollection collection = WebContentCollection.GetAll();

            foreach (WebContent o in collection)
            {
                if (o.WebContentID == webContentID)
                {
                    return(o);
                }
            }

            return(null);
        }
コード例 #2
0
        public static WebContent GetWebContent(string section, string utilisateur, string visualiseur)
        {
            if (section == String.Empty)
            {
                return(null);
            }

            WebContentCollection collection = WebContentCollection.GetAll();

            foreach (WebContent o in collection)
            {
                if (o.Section == section &&
                    o.Utilisateur == utilisateur &&
                    o.Visualisateur == visualiseur)
                {
                    return(o);
                }
            }

            return(null);
        }