Пример #1
0
 public static bool Delete(BlogEntry myBlogEntry)
 {
     if (myBlogEntry != null)
     {
         return(BlogEntryDB.Delete(myBlogEntry.id));
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns the total number of blog entries of the specified type in the database, excluding the ones marked private
        /// </summary>
        /// <param name="type">
        /// The type of blog entry
        /// </param>
        /// <param name="StartRow">
        /// The start position in the result set to retrieve records from
        /// </param>
        /// <param name="PageSize">
        /// The maximum number of records to retrieve from position StartRow
        /// </param>
        /// <returns>
        /// Returns the total number of blog entries of the specified type in the database
        /// </returns>

        public static int CountType(Types type, int StartRow, int PageSize)
        {
            return(BlogEntryDB.CountType(type, StartRow, PageSize));
        }
Пример #3
0
        /// <summary>
        /// Returns the total number of blog entries of the specified tag in the database, excluding the ones marked private
        /// </summary>
        /// <param name="TagID">
        /// The ID of the tag
        /// </param>
        /// <param name="StartRow">
        /// The start position in the result set to retrieve records from
        /// </param>
        /// <param name="PageSize">
        /// The maximum number of records to retrieve from position StartRow
        /// </param>
        /// <returns>
        /// Returns the total number of blog entries of the specified tag in the database
        /// </returns>

        public static int CountTag(int TagID, int StartRow, int PageSize)
        {
            return(BlogEntryDB.CountTag(TagID, StartRow, PageSize));
        }
Пример #4
0
        /// <summary>
        /// Returns the total number of blog entries in the database, excluding the ones marked private
        /// </summary>
        /// <param name="StartRow">
        /// The start position in the result set to retrieve records from
        /// </param>
        /// <param name="PageSize">
        /// The maximum number of records to retrieve from position StartRow
        /// </param>
        /// <returns>
        /// Returns the total number of blog entries in the database
        /// </returns>

        public static int Count(int StartRow, int PageSize)
        {
            return(BlogEntryDB.Count(StartRow, PageSize));
        }
Пример #5
0
 public static long Save(BlogEntry myBlogEntry)
 {
     return(BlogEntryDB.Save(myBlogEntry));
 }
Пример #6
0
 public static List <Month> GetListUsedMonths(int StartRow, int PageSize)
 {
     return(BlogEntryDB.GetListUsedMonths(StartRow, PageSize));
 }
Пример #7
0
 public static BlogEntry GetItem(long id)
 {
     return(BlogEntryDB.GetItem(id));
 }
Пример #8
0
 public static List <BlogEntry> GetListMonth(int year, int month, int StartRow, int PageSize)
 {
     return(BlogEntryDB.GetListMonth(year, month, StartRow, PageSize));
 }
Пример #9
0
 public static List <BlogEntry> GetListType(Types type, int StartRow, int PageSize)
 {
     return(BlogEntryDB.GetListType(type, StartRow, PageSize));
 }
Пример #10
0
 public static List <BlogEntry> GetListTag(int TagID, int StartRow, int PageSize)
 {
     return(BlogEntryDB.GetListTag(TagID, StartRow, PageSize));
 }
Пример #11
0
        /// <summary>
        /// Get all blog entries from the database, starting from position StartRow, return max PageSize results
        /// </summary>
        /// <param name="StartRow">
        /// The start position in the result set to retrieve records from
        /// </param>
        /// <param name="PageSize">
        /// The maximum number of records to retrieve from position StartRow
        /// </param>
        /// <returns>
        /// returns a list of BlogEntry objects
        /// </returns>

        public static List <BlogEntry> GetListAll(int StartRow, int PageSize)
        {
            return(BlogEntryDB.GetListAll(StartRow, PageSize));
        }
Пример #12
0
        /// <summary>
        /// Counts the blog entries for the specified year and month, excluding the ones marked private
        /// </summary>
        /// <param name="year">
        /// The year associated with the month
        /// </param>
        /// <param name="month">
        /// The months within the year
        /// </param>
        /// <param name="StartRow">
        /// The start position in the result set to retrieve records from
        /// </param>
        /// <param name="PageSize">
        /// The maximum number of records to retrieve from position StartRow
        /// </param>
        /// <returns>
        /// Returns the number of blog entries in the specified year and month
        /// </returns>

        public static int CountMonth(int year, int month, int StartRow, int PageSize)
        {
            return(BlogEntryDB.CountMonth(year, month, StartRow, PageSize));
        }