public static List <KLNotify> GetPageByAuthorID(int pageNumber, int pageSize, out int totalPages, int authorid) { totalPages = 1; IDataReader reader = DBKLNotify.GetPageByAuthorID(pageNumber, pageSize, out totalPages, authorid); return(LoadListFromReader(reader)); }
/// <summary> /// Gets an IList with page of instances of KLNotify. /// </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 <KLNotify> GetPage(int pageNumber, int pageSize, out int totalPages) { totalPages = 1; IDataReader reader = DBKLNotify.GetPage(pageNumber, pageSize, out totalPages); return(LoadListFromReader(reader)); }
/// <summary> /// Updates this instance of KLNotify. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBKLNotify.Update( this.notifyid, this.userName_Action, this.authorID, this.notifyType, this.notify, this.notifyLink, this.viewed, this.dateCreate)); }
/// <summary> /// Persists a new instance of KLNotify. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { int newID = 0; newID = DBKLNotify.Create( this.userName_Action, this.authorID, this.notifyType, this.notify, this.notifyLink, this.viewed, this.dateCreate); this.notifyid = newID; return(newID > 0); }
/// <summary> /// Gets an instance of KLNotify. /// </summary> /// <param name="notifyid"> notifyid </param> private void GetKLNotify( int notifyid) { using (IDataReader reader = DBKLNotify.GetOne( notifyid)) { if (reader.Read()) { this.notifyid = Convert.ToInt32(reader["Notifyid"]); this.userName_Action = reader["UserName_Action"].ToString(); this.authorID = Convert.ToInt32(reader["AuthorID"]); this.notifyType = reader["NotifyType"].ToString(); this.notify = reader["Notify"].ToString(); this.notifyLink = reader["NotifyLink"].ToString(); this.viewed = Convert.ToBoolean(reader["viewed"]); this.dateCreate = Convert.ToDateTime(reader["DateCreate"]); } } }
/// <summary> /// Gets an IList with all instances of KLNotify. /// </summary> public static List <KLNotify> GetAll() { IDataReader reader = DBKLNotify.GetAll(); return(LoadListFromReader(reader)); }
/// <summary> /// Gets a count of KLNotify. /// </summary> public static int GetCount() { return(DBKLNotify.GetCount()); }
/// <summary> /// Deletes an instance of KLNotify. Returns true on success. /// </summary> /// <param name="notifyid"> notifyid </param> /// <returns>bool</returns> public static bool Delete( int notifyid) { return(DBKLNotify.Delete( notifyid)); }