Esempio n. 1
0
        ///// <summary>
        ///// Gets an instance of HtmlContent.
        ///// </summary>
        ///// <param name="moduleID">moduleID</param>
        ///// <param name="itemID">itemID</param>
        //private void GetHtmlContent(int moduleId, int itemId)
        //{
        //    using (IDataReader reader = DBHtmlContent.GetHtmlContent(moduleId, itemId))
        //    {
        //        LoadFromReader(reader);
        //    }

        //}

        /// <summary>
        /// Gets an instance of HtmlContent.
        /// </summary>
        /// <param name="moduleId">moduleId</param>
        private void GetHtmlContent(int moduleId)
        {
            using (IDataReader reader = DBHtmlContent.GetHtmlContent(moduleId, DateTime.UtcNow))
            {
                LoadFromReader(reader);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Gets an instance of HtmlContent.
 /// </summary>
 /// <param name="moduleID">moduleID</param>
 /// <param name="itemID">itemID</param>
 private void GetHtmlContent(int moduleId, int itemId)
 {
     using (IDataReader reader = DBHtmlContent.GetHtmlContent(moduleId, itemId))
     {
         LoadFromReader(reader);
     }
 }
Esempio n. 3
0
        public HtmlContent Fetch(int moduleId)
        {
            if (moduleId < 0)
            {
                return(null);
            }

            using (IDataReader reader = DBHtmlContent.GetHtmlContent(moduleId, DateTime.UtcNow))
            {
                if (reader.Read())
                {
                    HtmlContent content = new HtmlContent();
                    LoadFromReader(content, reader);
                    return(content);
                }
            }

            return(null);
        }
Esempio n. 4
0
 public static IDataReader GetHtml(int moduleId, DateTime beginDate)
 {
     return(DBHtmlContent.GetHtmlContent(moduleId, beginDate));
 }