//#region Private Methods //private void GetTagItem(Guid guid) //{ // using (IDataReader reader = DBTagItem.GetOne(guid)) // { // if (reader.Read()) // { // this.guid = new Guid(reader["Guid"].ToString()); // this.tagID = Convert.ToInt32(reader["TagID"]); // this.itemGuid = new Guid(reader["ItemGuid"].ToString()); // } // } //} //private bool Create() //{ // this.guid = Guid.NewGuid(); // int rowsAffected = DBTagItem.Create( // this.guid, // this.tagID, // this.itemGuid); // return (rowsAffected > 0); //} //private bool Update() //{ // return DBTagItem.Update( // this.guid, // this.tagID, // this.itemGuid); //} //#endregion //#region Public Methods ///// <summary> ///// Saves this instance of TagItem. Returns true on success. ///// </summary> ///// <returns>bool</returns> //public bool Save() //{ // if (this.guid != Guid.Empty) // { // return Update(); // } // else // { // return Create(); // } //} //#endregion #region Static Methods public static bool Create(int tagId, Guid itemGuid) { int rowsAffected = DBTagItem.Create( Guid.NewGuid(), tagId, itemGuid); return(rowsAffected > 0); }
public TagItem SaveTagItem(TagItem tagItem, out bool result) { tagItem.TagItemGuid = Guid.NewGuid(); result = DBTagItem.Create( tagItem.TagItemGuid, tagItem.SiteGuid, tagItem.FeatureGuid, tagItem.ModuleGuid, tagItem.RelatedItemGuid, tagItem.TagGuid, tagItem.ExtraGuid, tagItem.TaggedBy ); return(tagItem); }
public List <TagItem> GetTagItemsByRelatedItemGuid(Guid relatedItemGuid) { return(getTagItemListFromIDataReader(DBTagItem.GetByRelatedItem(relatedItemGuid))); }
public bool DeleteTagItemBySiteGuid(Guid siteGuid) { return(DBTagItem.DeleteBySite(siteGuid)); }
public bool DeleteTagItemByFeatureGuid(Guid featureGuid) { return(DBTagItem.DeleteByFeature(featureGuid)); }
public bool DeleteTagItemByModuleGuid(Guid moduleGuid) { return(DBTagItem.DeleteByModule(moduleGuid)); }
public bool DeleteTagItemByTagGuid(Guid tagGuid) { return(DBTagItem.DeleteByTag(tagGuid)); }
public bool DeleteTagItemByExtraGuid(Guid extraGuid) { return(DBTagItem.DeleteByExtraGuid(extraGuid)); }
public static List <TagItem> GetTagItemsByExtraGuid(Guid siteGuid, Guid extraGuid) { return(getTagItemListFromIDataReader(DBTagItem.GetByExtra(siteGuid, extraGuid))); }
public bool DeleteTagItemByGuid(Guid guid) { return(DBTagItem.Delete(guid)); }
public static List <TagItem> GetByItem(Guid itemGuid, int languageId = -1) { IDataReader reader = DBTagItem.GetByItem(itemGuid, languageId); return(LoadListFromReader(reader)); }
public static bool DeleteByTag(int tagId) { return(DBTagItem.DeleteByTag(tagId)); }
public static bool Delete(Guid guid) { return(DBTagItem.Delete(guid)); }
public List <TagItem> GetTagItemsByRelatedExtraGuid(Guid extraGuid) { return(getTagItemListFromIDataReader(DBTagItem.GetByExtra(extraGuid))); }
public bool DeleteTagItemByItemGuid(Guid itemGuid) { return(DBTagItem.DeleteByItem(itemGuid)); }
public TagItem GetTagItemByTagItemGuid(Guid tagItemGuid) { return(getTagItemFromIDataReader(DBTagItem.GetByTagItem(tagItemGuid))); }
public static bool DeleteTagItemByItemGuid(Guid itemGuid) { return(DBTagItem.DeleteByRelatedItem(itemGuid)); }