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)); }
/// <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)); }
/// <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); }
/// <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"]); } } }
/// <summary> /// Gets an IList with all instances of KLFowllowAuthor. /// </summary> public static List <KLFowllowAuthor> GetAll() { IDataReader reader = DBKLFowllowAuthor.GetAll(); return(LoadListFromReader(reader)); }
/// <summary> /// Gets a count of KLFowllowAuthor. /// </summary> public static int GetCount() { return(DBKLFowllowAuthor.GetCount()); }
/// <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)); }