Exemple #1
0
        /// <summary>
        /// Gets an IList with page of instances of KLLikeHistory.
        /// </summary>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="totalPages">total pages</param>
        public static List <KLLikeHistory> GetPage(int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBKLLikeHistory.GetPage(pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader));
        }
Exemple #2
0
 /// <summary>
 /// Updates this instance of KLLikeHistory. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBKLLikeHistory.Update(
                this.likeID,
                this.authorID,
                this.newsID,
                this.createDate));
 }
Exemple #3
0
        /// <summary>
        /// Persists a new instance of KLLikeHistory. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            int newID = 0;

            newID = DBKLLikeHistory.Create(
                this.authorID,
                this.newsID,
                this.createDate);

            this.likeID = newID;

            return(newID > 0);
        }
Exemple #4
0
 /// <summary>
 /// Gets an instance of KLLikeHistory.
 /// </summary>
 /// <param name="likeID"> likeID </param>
 private void GetKLLikeHistory(
     int likeID)
 {
     using (IDataReader reader = DBKLLikeHistory.GetOne(
                likeID))
     {
         if (reader.Read())
         {
             this.likeID     = Convert.ToInt32(reader["LikeID"]);
             this.authorID   = Convert.ToInt32(reader["AuthorID"]);
             this.newsID     = Convert.ToInt32(reader["NewsID"]);
             this.createDate = Convert.ToDateTime(reader["CreateDate"]);
         }
     }
 }
Exemple #5
0
        /// <summary>
        /// Gets an IList with all instances of KLLikeHistory.
        /// </summary>
        public static List <KLLikeHistory> GetAll()
        {
            IDataReader reader = DBKLLikeHistory.GetAll();

            return(LoadListFromReader(reader));
        }
Exemple #6
0
 /// <summary>
 /// Gets a count of KLLikeHistory.
 /// </summary>
 public static int GetCount()
 {
     return(DBKLLikeHistory.GetCount());
 }
Exemple #7
0
 /// <summary>
 /// Deletes an instance of KLLikeHistory. Returns true on success.
 /// </summary>
 /// <param name="likeID"> likeID </param>
 /// <returns>bool</returns>
 public static bool Delete(
     int likeID)
 {
     return(DBKLLikeHistory.Delete(
                likeID));
 }