/// <summary> /// ɾ����Դ����Ӧ�����ǩ�Ķ�Ӧ��ϵ /// </summary> /// <param name="resourceID"></param> public new void Delete(int resourceID) { base.Delete(resourceID); // ɾ����Դ LabMS.DAL.ResourceTag resourceTag = new LabMS.DAL.ResourceTag(); resourceTag.Delete(resourceID, LabMS.DAL.ResourceTag.DeleteType.ByResourceID); // ɾ����ؼ��ֵĶ�Ӧ��ϵ }
/// <summary> /// ������Դ /// </summary> /// <param name="resourceInfo">��Դ</param> /// <param name="tags">��Դ�ı�ǩ���ؼ��֣�</param> public void Update(LabMS.Model.Resource resourceInfo, params string[] tags) { base.Update(resourceInfo); if (tags != null && tags.Length > 0) { LabMS.Model.ResourceTag resourceTagInfo = new LabMS.Model.ResourceTag(); LabMS.Model.Tag tagInfo = new LabMS.Model.Tag(); LabMS.DAL.ResourceTag resourceTag = new LabMS.DAL.ResourceTag(); ExtendBLL.Tag tag = new Tag(); resourceTagInfo.Resource = resourceInfo; resourceTag.Delete(resourceInfo.id, LabMS.DAL.ResourceTag.DeleteType.ByResourceID); // ɾ�����ж�Ӧ��ϵ // �����ؼ��ֵĶ�Ӧ foreach (string tagName in tags) { if (!string.IsNullOrEmpty(tagName)) { tagInfo = tag.InsertGet(tagName); resourceTagInfo.Tag = tagInfo; resourceTag.AddGet(resourceTagInfo); } } } }