Ejemplo n.º 1
0
        public int Add(ArticleModel model)
        {
            ArticleDAL article = new ArticleDAL();

            int categoryId = model.CategoryId;

            Startech.Category.CategoryModel Ctymodel = new CategoryDAL().GetCategoryDetail(categoryId);
            if (Ctymodel.Type == 1)
            {
                return(new ArticleDAL().Add(model));
            }
            else
            {
                int count = article.GetRecordCount(String.Format("CategoryId={0}", categoryId));
                if (count == 0)
                {
                    return(new ArticleDAL().Add(model));
                }
                else
                {
                    return(-2);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 全选取消审核
        /// </summary>
        /// <param name="newsId"></param>
        /// <param name="state"></param>
        public void ApproveCellArticleAll(string articleIds)
        {
            ArticleDAL article = new ArticleDAL();

            article.ApproveCellArticleAll(articleIds);
        }