コード例 #1
0
 /// <summary>
 /// Gets an instance of ContentStyle.
 /// </summary>
 /// <param name="guid"> guid </param>
 private void GetContentStyle(Guid guid)
 {
     using (IDataReader reader = DBContentStyle.GetOne(guid))
     {
         PopulateFromReader(reader);
     }
 }
コード例 #2
0
        /// <summary>
        /// Gets an IList with page of instances of ContentStyle.
        /// </summary>
        public static List <ContentStyle> GetPage(
            Guid siteGuid,
            int pageNumber,
            int pageSize,
            out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBContentStyle.GetPage(siteGuid, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader));
        }
コード例 #3
0
 /// <summary>
 /// Updates this instance of ContentStyle. Returns true on success.
 /// </summary>
 /// <returns>bool</returns>
 private bool Update()
 {
     return(DBContentStyle.Update(
                this.guid,
                this.siteGuid,
                this.name,
                this.element,
                this.cssClass,
                this.skinName,
                this.isActive,
                DateTime.UtcNow,
                this.lastModBy));
 }
コード例 #4
0
        /// <summary>
        /// Persists a new instance of ContentStyle. Returns true on success.
        /// </summary>
        /// <returns></returns>
        private bool Create()
        {
            this.guid = Guid.NewGuid();

            int rowsAffected = DBContentStyle.Create(
                this.guid,
                this.siteGuid,
                this.name,
                this.element,
                this.cssClass,
                this.skinName,
                this.isActive,
                DateTime.UtcNow,
                this.createdBy);

            return(rowsAffected > 0);
        }
コード例 #5
0
 /// <summary>
 /// Gets an IDataReader with all active instances of ContentStyle for the given skin.
 /// </summary>
 public static IDataReader GetAllActive(Guid siteGuid, string skinName)
 {
     return(DBContentStyle.GetAllActive(siteGuid, skinName));
 }
コード例 #6
0
 /// <summary>
 /// Gets an IDataReader with all active instances of ContentStyle.
 /// </summary>
 public static IDataReader GetAllActive(Guid siteGuid)
 {
     return(DBContentStyle.GetAllActive(siteGuid));
 }
コード例 #7
0
        /// <summary>
        /// Gets an IList with all instances of ContentStyle for the given skin.
        /// </summary>
        public static List <ContentStyle> GetAll(Guid siteGuid, string skinName)
        {
            IDataReader reader = DBContentStyle.GetAll(siteGuid, skinName);

            return(LoadListFromReader(reader));
        }
コード例 #8
0
 /// <summary>
 /// Gets a count of ContentStyle.
 /// </summary>
 public static int GetCount(Guid siteGuid, string skinName)
 {
     return(DBContentStyle.GetCount(siteGuid, skinName));
 }
コード例 #9
0
 /// <summary>
 /// Gets a count of ContentStyle.
 /// </summary>
 public static int GetCount(Guid siteGuid)
 {
     return(DBContentStyle.GetCount(siteGuid));
 }
コード例 #10
0
        /// <summary>
        /// Makes all styles of the given skin name inactive.
        /// </summary>
        /// <param name="siteGuid"> siteGuid </param>
        /// <param name="skinName"> skinName </param>
        /// <returns>bool</returns>
        public static bool MakeInActiveBySkin(Guid siteGuid, string skinName)
        {
            bool isActive = false;

            return(DBContentStyle.SetActivationBySkin(siteGuid, skinName, isActive));
        }
コード例 #11
0
 /// <summary>
 /// Deletes rows from the mp_ContentStyle table for the passed siteGuid. Returns true if rows deleted.
 /// </summary>
 public static bool DeleteBySkin(Guid siteGuid, string skinName)
 {
     return(DBContentStyle.DeleteBySkin(siteGuid, skinName));
 }
コード例 #12
0
 /// <summary>
 /// Deletes rows from the mp_ContentStyle table for the passed siteGuid. Returns true if rows deleted.
 /// </summary>
 /// <param name="siteGuid"> siteGuid </param>
 /// <returns>bool</returns>
 public static bool DeleteBySite(Guid siteGuid)
 {
     return(DBContentStyle.DeleteBySite(siteGuid));
 }
コード例 #13
0
 /// <summary>
 /// Deletes an instance of ContentStyle. Returns true on success.
 /// </summary>
 /// <param name="guid"> guid </param>
 /// <returns>bool</returns>
 public static bool Delete(Guid guid)
 {
     return(DBContentStyle.Delete(guid));
 }