public IActionResult DeleteById(int id)
        {
            string templateFile = _templateApp.DeleteById(id);

            if (templateFile != null)
            {
                string filePath = Path.Combine(GlobalParamsDto.WebRoot, templateFile);
                FileUtils.DeleteFileIfExists(filePath);
            }

            return(Success("删除成功"));
        }
예제 #2
0
        public IActionResult DeleteById(int id)
        {
            string templateFile = _templateApp.DeleteById(id);

            if (templateFile != null)
            {
                string filePath = Path.Combine(GlobalContext.WebRootPath, templateFile);
                FileUtils.DeleteFileIfExists(filePath);
                RenderDocumentCache.Clear();
            }

            return(Success("删除成功"));
        }