public JsonResult BorrowBook(string BookId, string bookName, string bookAuthor, string bookPrice, string bookPic, string userId) { RecordDAO recordDAO = new RecordDAO(); BookDAO bookDAO = new BookDAO(); Book book = new Book(); Record record = new Record(); book.BookId = int.Parse(BookId); book.BookName = bookName; book.BookAuthor = bookAuthor; book.BookPrice = bookPrice; book.BookPic = bookPic; book.Status = 0; bookDAO.Update(book); int count = recordDAO.Insert(int.Parse(BookId), userId); return(Json(1, JsonRequestBehavior.AllowGet)); }