示例#1
0
        public Tag SaveTag(Tag tag, out bool result)
        {
            if (tag.Guid == Guid.Empty)
            {
                tag.Guid = Guid.NewGuid();

                result = DBTag.Create(
                    tag.Guid,
                    tag.SiteGuid,
                    tag.FeatureGuid,
                    tag.ModuleGuid,
                    tag.TagText,
                    tag.CreatedUtc,
                    tag.CreatedBy,
                    tag.VocabularyGuid
                    );
            }
            else
            {
                result = DBTag.Update(
                    tag.Guid,
                    tag.TagText,
                    tag.ModifiedUtc,
                    tag.ModifiedBy,
                    tag.VocabularyGuid
                    );
            }

            return(tag);
        }
示例#2
0
文件: Tag.cs 项目: sang-nm/mphc
        private int Create()
        {
            int newID = 0;

            this.guid = Guid.NewGuid();

            newID = DBTag.Create(
                this.siteGuid,
                this.featureGuid,
                this.tag,
                this.itemCount,
                this.guid,
                this.createdUtc,
                this.createdBy);

            this.tagID = newID;

            return(newID);
        }