Ejemplo n.º 1
0
 /// <summary>
 /// Gets an instance of ContentHistory.
 /// </summary>
 /// <param name="guid"> guid </param>
 private void GetContentHistory(Guid guid)
 {
     using (IDataReader reader = DBContentHistory.GetOne(guid))
     {
         PopulateFromReader(reader);
     }
 }
Ejemplo n.º 2
0
 public static IDataReader GetPageAsReader(
     Guid contentGuid,
     int pageNumber,
     int pageSize,
     out int totalPages)
 {
     return(DBContentHistory.GetPage(
                contentGuid,
                pageNumber,
                pageSize,
                out totalPages));
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets an IList with page of instances of ContentHistory.
        /// </summary>
        public static List <ContentHistory> GetPage(
            Guid contentGuid,
            int pageNumber,
            int pageSize,
            out int totalPages)
        {
            totalPages = 1;

            IDataReader reader = DBContentHistory.GetPage(
                contentGuid,
                pageNumber,
                pageSize,
                out totalPages);

            return(LoadListFromReader(reader));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Persists a new instance of ContentHistory. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            this.guid = Guid.NewGuid();

            int rowsAffected = DBContentHistory.Create(
                this.guid,
                this.siteGuid,
                this.userGuid,
                this.contentGuid,
                this.title,
                this.contentText,
                this.customData,
                this.createdUtc,
                this.historyUtc);

            return(rowsAffected > 0);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets a count of ContentHistory.
 /// </summary>
 public static int GetCount(Guid contentGuid)
 {
     return(DBContentHistory.GetCount(contentGuid));
 }
Ejemplo n.º 6
0
 public static bool DeleteByContent(Guid contentGuid)
 {
     return(DBContentHistory.DeleteByContent(contentGuid));
 }
Ejemplo n.º 7
0
 public static bool DeleteBySite(Guid siteGuid)
 {
     return(DBContentHistory.DeleteBySite(siteGuid));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Deletes an instance of ContentHistory. Returns true on success.
 /// </summary>
 /// <param name="guid"> guid </param>
 /// <returns>bool</returns>
 public static bool Delete(Guid guid)
 {
     return(DBContentHistory.Delete(guid));
 }