/// <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); } }
/// <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)); }
/// <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)); }
/// <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); }
/// <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)); }
/// <summary> /// Gets an IDataReader with all active instances of ContentStyle. /// </summary> public static IDataReader GetAllActive(Guid siteGuid) { return(DBContentStyle.GetAllActive(siteGuid)); }
/// <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)); }
/// <summary> /// Gets a count of ContentStyle. /// </summary> public static int GetCount(Guid siteGuid, string skinName) { return(DBContentStyle.GetCount(siteGuid, skinName)); }
/// <summary> /// Gets a count of ContentStyle. /// </summary> public static int GetCount(Guid siteGuid) { return(DBContentStyle.GetCount(siteGuid)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }