예제 #1
0
        public override void Delete(ManagedSecurityContext sec)
        {
            ManagedDiscussion.FindAndDelete(
                Session, mInstance.Account.Id, typeof(Place), mInstance.Id, sec);

            foreach (PlacePicture pic in Collection <PlacePicture> .GetSafeCollection(mInstance.PlacePictures))
            {
                new ManagedPlacePicture(Session, pic).Delete(sec);
            }

            foreach (AccountEvent evt in Collection <AccountEvent> .GetSafeCollection(mInstance.AccountEvents))
            {
                new ManagedAccountEvent(Session, evt).Delete(sec);
            }

            ManagedMadLibInstance.Delete(Session, sec, "Place", Id);
            Session.Delete(string.Format("FROM AccountPlace f WHERE f.Place.Id = {0}", Id));
            Session.Delete(string.Format("FROM AccountGroupPlace f WHERE f.Place.Id = {0}", Id));
            Session.Delete(string.Format("FROM AccountPlaceRequest f WHERE f.Place.Id = {0}", Id));
            Session.Delete(string.Format("FROM AccountPlaceFavorite f WHERE f.Place.Id = {0}", Id));
            Session.Delete(string.Format("FROM PlaceQueueItem q WHERE q.Place.Id = {0}", Id));
            Session.Delete(string.Format("FROM PlaceChangeRequest r WHERE r.Place.Id = {0}", Id));
            ManagedFeature.Delete(Session, "Place", Id);
            base.Delete(sec);
        }
예제 #2
0
 public override void Delete(ManagedSecurityContext sec)
 {
     ManagedDiscussion.FindAndDelete(
         Session, mInstance.AccountFeed.Account.Id, typeof(AccountFeedItem), mInstance.Id, sec);
     ManagedFeature.Delete(Session, "AccountFeedItem", Id);
     base.Delete(sec);
 }
예제 #3
0
        public override void Delete(ManagedSecurityContext sec)
        {
            ManagedFeature.Delete(Session, "AccountLicense", Id);
            Collection <AccountLicense> .GetSafeCollection(mInstance.Account.AccountLicenses).Remove(mInstance);

            base.Delete(sec);
        }
예제 #4
0
        public override void Delete(ManagedSecurityContext sec)
        {
            ManagedDiscussion.FindAndDelete(Session, mInstance.Account.Id, typeof(AccountEvent), mInstance.Id, sec);
            ManagedFeature.Delete(Session, "AccountEvent", Id);
            Collection <AccountEvent> .GetSafeCollection(mInstance.Account.AccountEvents).Remove(mInstance);

            base.Delete(sec);
        }
예제 #5
0
        public override void Delete(ManagedSecurityContext sec)
        {
            foreach (AccountFeedItem item in Collection <AccountFeedItem> .GetSafeCollection(mInstance.AccountFeedItems))
            {
                ManagedAccountFeedItem m_item = new ManagedAccountFeedItem(Session, item);
                m_item.Delete(sec);
            }

            ManagedFeature.Delete(Session, "AccountFeed", Id);
            base.Delete(sec);
        }
예제 #6
0
 public override void Delete(ManagedSecurityContext sec)
 {
     ManagedDiscussion.FindAndDelete(Session, typeof(AccountGroup), Id, sec);
     Session.Delete(string.Format("FROM AccountGroupAccountRequest r WHERE r.AccountGroup.Id = {0}", Id));
     Session.Delete(string.Format("FROM AccountGroupAccountInvitation i WHERE i.AccountGroup.Id = {0}", Id));
     Session.Delete(string.Format("FROM AccountGroupPlace p WHERE p.AccountGroup.Id = {0}", Id));
     Session.Delete(string.Format("FROM AccountRssWatch w WHERE w.Url = 'AccountGroupRss.aspx?id={0}'", Id));
     Session.Delete(string.Format("FROM AccountInvitation i WHERE i.AccountGroup.Id = {0}", Id));
     ManagedFeature.Delete(Session, "AccountGroup", Id);
     base.Delete(sec);
 }
예제 #7
0
        public override void Delete(ManagedSecurityContext sec)
        {
            // orphan groups
            foreach (AccountGroup group in Collection <AccountGroup> .GetSafeCollection(mInstance.AccountGroups))
            {
                group.AccountBlog = null;
                Session.Save(group);
            }
            // delete features
            ManagedFeature.Delete(Session, "AccountBlog", Id);
            // delete automatic feeds
            AccountFeed feed = GetSyndicatedFeed();

            if (feed != null)
            {
                Session.Delete(feed);
            }
            base.Delete(sec);
        }