Example #1
0
        /// <summary>
        /// 添加试题
        /// </summary>
        /// <returns>受影响的行数</returns>
        public int AddItem(Item item)
        {
            int            id             = dal.AddItem(item);
            BookChapterBLL objChapterBll  = new BookChapterBLL();
            string         strChapterName = objChapterBll.GetBookChapter(item.ChapterId).ChapterName;
            BookBLL        objBookBll     = new BookBLL();
            string         strBookName    = objBookBll.GetBook(item.BookId).bookName;

            objLogBll.WriteLog("新增教材《" + strBookName + "》中“" + strChapterName + "”的试题信息");
            return(id);
        }
Example #2
0
        public bool AddItem(Item item)
        {
            if (!itemDal.GetItem(item.Name, item.CategoryId, item.CompanyId))
            {
                return(false);
            }

            return(itemDal.AddItem(item));
        }
Example #3
0
 public void Additem(Item item)
 {
     try
     {
         itemDAL.AddItem(item);
     }
     catch
     {
         throw new Exception("Could not insert item into database");
     }
 }