Example #1
0
        public void DeleteBook(int bookID)
        {
            string strBookName = dal.GetBook(bookID).bookName;

            dal.DeleteBook(bookID);
            objLogBll.WriteLog("删除教材《" + strBookName + "》基本信息");
        }
Example #2
0
        public ActionResult Delete(int ID)
        {
            bool status = false;

            if (BookDAL.DeleteBook(ID) > 0)
            {
                status = true;
            }
            return(Json(status, JsonRequestBehavior.AllowGet));
        }
Example #3
0
 public void DeleteBook(int id)
 {
     try
     {
         Book book = _context.Book.Find(id);
         if (book != null)
         {
             _bookDAL.DeleteBook(book);
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error from BookBLL: " + ex.Message.ToString());
     }
 }