コード例 #1
0
        public void DeleteModule(string id)
        {
            BaseService.CheckLoginAndLicense();
            BaseModule module = GetModule(id);

            module.Delete();
            //CmsPage page = module.Page;
            //if (page != null)
            //{
            //    //verwijderen drilldown modules
            //    string where = String.Format("FK_Page='{0}'", module.Page.ID);
            //    BaseCollection<BaseModule> modulesOnThisPage = BaseCollection<BaseModule>.Get(where);
            //    //foreach (BaseModule mod in modulesOnThisPage)
            //    //{
            //    //    if (mod.DrillDownType == NavigationTypeEnum.ShowDetailsInModules)
            //    //    {
            //    //        string modArray = mod.DrillDownModules.ToString().Replace(module.ID + ",", "");
            //    //        mod.DrillDownModules = modArray.Split(new char[] { ',' });
            //    //    }
            //    //}
            //    //Remove page from caching.
            //    //BitCaching.RemoveItemFromCache(page.ID.ToString());
            //}
            ////SetUnpublishedItem(module);
            //module.Delete();

            //PublishDependentPages(module);
        }