Beispiel #1
0
        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));
        }
Beispiel #2
0
        /// <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));
        }
Beispiel #3
0
 /// <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));
 }
Beispiel #4
0
        /// <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);
        }
Beispiel #5
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"]);
         }
     }
 }
Beispiel #6
0
        /// <summary>
        /// Gets an IList with all instances of KLNotify.
        /// </summary>
        public static List <KLNotify> GetAll()
        {
            IDataReader reader = DBKLNotify.GetAll();

            return(LoadListFromReader(reader));
        }
Beispiel #7
0
 /// <summary>
 /// Gets a count of KLNotify.
 /// </summary>
 public static int GetCount()
 {
     return(DBKLNotify.GetCount());
 }
Beispiel #8
0
 /// <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));
 }