public void DeleteBook(int bookID) { string strBookName = dal.GetBook(bookID).bookName; dal.DeleteBook(bookID); objLogBll.WriteLog("删除教材《" + strBookName + "》基本信息"); }
public ActionResult Delete(int ID) { bool status = false; if (BookDAL.DeleteBook(ID) > 0) { status = true; } return(Json(status, JsonRequestBehavior.AllowGet)); }
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()); } }