Esempio n. 1
0
        public bool RenameResource(string ResourceId, string NewResourceId, string ResourceSet)
        {
#if OnlineDemo
            throw new ApplicationException(WebUtils.LRes("FeatureDisabled"));
#endif

            if (!Manager.RenameResource(ResourceId, NewResourceId, ResourceSet))
            {
                throw new ApplicationException(WebUtils.LRes("InvalidResourceId"));
            }

            return(true);
        }
        public bool RenameResource([FromBody] dynamic parms)
        {
#if OnlineDemo
        throw new ApplicationException(WebUtils.GRes("FeatureDisabled"));
#endif
            string resourceId = parms["resourceId"];
            string newResourceId = parms["newResourceId"];
            string resourceSet = parms["resourceSet"];


            if (!Manager.RenameResource(resourceId, newResourceId, resourceSet))
                throw new ApplicationException(DbIRes.T("InvalidResourceId", STR_RESOURCESET));

            return true;
        }
        public bool RenameResource(dynamic parms)
        {
#if OnlineDemo
            throw new ApplicationException(WebUtils.GRes("FeatureDisabled"));
#endif
            string resourceId    = parms["resourceId"];
            string newResourceId = parms["newResourceId"];
            string resourceSet   = parms["resourceSet"];


            if (!Manager.RenameResource(resourceId, newResourceId, resourceSet))
            {
                throw new ApplicationException(WebUtils.GRes(STR_RESOURCESET,
                                                             "InvalidResourceId"));
            }

            return(true);
        }