/// <summary> /// 更新一条数据 /// </summary> public bool Update(ArticleModel model) { return(dal.Update(model)); }
//public int Add(ArticleModel model) //{ // int categoryId = model.CategoryId; // CategoryModel Ctymodel = new CategoryDAL().GetCategoryDetail(categoryId); // if (Ctymodel.Type == 1) // return dal.Add(model); // else // { // int count = dal.GetRecordCount(String.Format("CategoryId={0}", categoryId)); // if (count == 0) // return dal.Add(model); // else return -2; // } //} /// <summary> /// 增加一条数据 /// </summary> public int Add(ArticleModel model) { return(dal.Add(model)); }