/// <summary> /// 添加或更新分类信息 /// </summary> /// <param name="model"></param> /// <returns>主键ID</returns> public static int Create(CategoryInfo model) { if (model.Id == 0) { //Insert int i = CategoryManage.Insert(model); model.Id = i; } else { //Update CategoryManage.Update(model); } return(model.Id); }