コード例 #1
0
        public static List <KLFowllowAuthor> GetPageByAuthorID(int pageNumber, int pageSize, out int totalPages, int authorid)
        {
            totalPages = 1;
            IDataReader reader = DBKLFowllowAuthor.GetPageByAuthor(pageNumber, pageSize, out totalPages, authorid);

            return(LoadListFromReader(reader));
        }
コード例 #2
0
 /// <summary>
 /// Updates this instance of KLFowllowAuthor. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBKLFowllowAuthor.Update(
                this.followID,
                this.userID,
                this.authorID,
                this.dateStartFollow));
 }
コード例 #3
0
        /// <summary>
        /// Persists a new instance of KLFowllowAuthor. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            int newID = 0;

            newID = DBKLFowllowAuthor.Create(
                this.userID,
                this.authorID,
                this.dateStartFollow);

            this.followID = newID;

            return(newID > 0);
        }
コード例 #4
0
 /// <summary>
 /// Gets an instance of KLFowllowAuthor.
 /// </summary>
 /// <param name="followID"> followID </param>
 private void GetKLFowllowAuthor(
     int followID)
 {
     using (IDataReader reader = DBKLFowllowAuthor.GetOne(
                followID))
     {
         if (reader.Read())
         {
             this.followID        = Convert.ToInt32(reader["FollowID"]);
             this.userID          = Convert.ToInt32(reader["UserID"]);
             this.authorID        = Convert.ToInt32(reader["AuthorID"]);
             this.dateStartFollow = Convert.ToDateTime(reader["DateStartFollow"]);
         }
     }
 }
コード例 #5
0
        /// <summary>
        /// Gets an IList with all instances of KLFowllowAuthor.
        /// </summary>
        public static List <KLFowllowAuthor> GetAll()
        {
            IDataReader reader = DBKLFowllowAuthor.GetAll();

            return(LoadListFromReader(reader));
        }
コード例 #6
0
 /// <summary>
 /// Gets a count of KLFowllowAuthor.
 /// </summary>
 public static int GetCount()
 {
     return(DBKLFowllowAuthor.GetCount());
 }
コード例 #7
0
 /// <summary>
 /// Deletes an instance of KLFowllowAuthor. Returns true on success.
 /// </summary>
 /// <param name="followID"> followID </param>
 /// <returns>bool</returns>
 public static bool Delete(
     int followID)
 {
     return(DBKLFowllowAuthor.Delete(
                followID));
 }