public ActionResult Add(long?id, string name, long parentId)
        {
            ArticleCategoryInfo articleCategoryInfo = new ArticleCategoryInfo()
            {
                Id               = id.GetValueOrDefault(),
                Name             = name,
                ParentCategoryId = parentId
            };
            ArticleCategoryInfo     articleCategoryInfo1   = articleCategoryInfo;
            IArticleCategoryService articleCategoryService = ServiceHelper.Create <IArticleCategoryService>();

            if (articleCategoryService.CheckHaveRename(articleCategoryInfo1.Id, articleCategoryInfo1.Name))
            {
                return(Json(new { success = false, msg = "不可添加、修改为同名栏目!" }));
            }
            long?nullable = id;

            if ((nullable.GetValueOrDefault() <= 0 ? true : !nullable.HasValue))
            {
                articleCategoryService.AddArticleCategory(articleCategoryInfo1);
            }
            else
            {
                articleCategoryService.UpdateArticleCategory(articleCategoryInfo1);
            }
            return(Json(new { success = true }));
        }