Пример #1
0
        public string Restore(long referenceId)
        {
            ReferenceId = referenceId;
            Get(Sqls.TableTypes.Deleted, where : Rds.ItemsWhere().ReferenceId(ReferenceId));
            SetSite();
            switch (ReferenceType)
            {
            case "Sites": return(SiteUtilities.Restore(siteId: ReferenceId));

            case "Issues": return(IssueUtilities.Restore(
                                      ss: SiteSettingsUtilities.IssuesSiteSettings(Site, ReferenceId),
                                      issueId: ReferenceId));

            case "Results": return(ResultUtilities.Restore(
                                       ss: SiteSettingsUtilities.ResultsSiteSettings(Site, ReferenceId),
                                       resultId: ReferenceId));

            case "Wikis": return(WikiUtilities.Restore(
                                     ss: SiteSettingsUtilities.WikisSiteSettings(Site, ReferenceId),
                                     wikiId: ReferenceId));

            default: return(Messages.ResponseNotFound().ToJson());
            }
        }