///// <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); } }
/// <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); } }
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); }
public static IDataReader GetHtml(int moduleId, DateTime beginDate) { return(DBHtmlContent.GetHtmlContent(moduleId, beginDate)); }