Exemple #1
0
        //#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);
        }
Exemple #2
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);
        }
Exemple #3
0
 public List <TagItem> GetTagItemsByRelatedItemGuid(Guid relatedItemGuid)
 {
     return(getTagItemListFromIDataReader(DBTagItem.GetByRelatedItem(relatedItemGuid)));
 }
Exemple #4
0
 public bool DeleteTagItemBySiteGuid(Guid siteGuid)
 {
     return(DBTagItem.DeleteBySite(siteGuid));
 }
Exemple #5
0
 public bool DeleteTagItemByFeatureGuid(Guid featureGuid)
 {
     return(DBTagItem.DeleteByFeature(featureGuid));
 }
Exemple #6
0
 public bool DeleteTagItemByModuleGuid(Guid moduleGuid)
 {
     return(DBTagItem.DeleteByModule(moduleGuid));
 }
Exemple #7
0
 public bool DeleteTagItemByTagGuid(Guid tagGuid)
 {
     return(DBTagItem.DeleteByTag(tagGuid));
 }
Exemple #8
0
 public bool DeleteTagItemByExtraGuid(Guid extraGuid)
 {
     return(DBTagItem.DeleteByExtraGuid(extraGuid));
 }
Exemple #9
0
 public static List <TagItem> GetTagItemsByExtraGuid(Guid siteGuid, Guid extraGuid)
 {
     return(getTagItemListFromIDataReader(DBTagItem.GetByExtra(siteGuid, extraGuid)));
 }
Exemple #10
0
 public bool DeleteTagItemByGuid(Guid guid)
 {
     return(DBTagItem.Delete(guid));
 }
Exemple #11
0
        public static List <TagItem> GetByItem(Guid itemGuid, int languageId = -1)
        {
            IDataReader reader = DBTagItem.GetByItem(itemGuid, languageId);

            return(LoadListFromReader(reader));
        }
Exemple #12
0
 public static bool DeleteByTag(int tagId)
 {
     return(DBTagItem.DeleteByTag(tagId));
 }
Exemple #13
0
 public static bool Delete(Guid guid)
 {
     return(DBTagItem.Delete(guid));
 }
Exemple #14
0
 public List <TagItem> GetTagItemsByRelatedExtraGuid(Guid extraGuid)
 {
     return(getTagItemListFromIDataReader(DBTagItem.GetByExtra(extraGuid)));
 }
Exemple #15
0
 public bool DeleteTagItemByItemGuid(Guid itemGuid)
 {
     return(DBTagItem.DeleteByItem(itemGuid));
 }
Exemple #16
0
 public TagItem GetTagItemByTagItemGuid(Guid tagItemGuid)
 {
     return(getTagItemFromIDataReader(DBTagItem.GetByTagItem(tagItemGuid)));
 }
Exemple #17
0
 public static bool DeleteTagItemByItemGuid(Guid itemGuid)
 {
     return(DBTagItem.DeleteByRelatedItem(itemGuid));
 }