void addreservebook()
        {
            for (int i = 0; i < reserverecord.books.Count; i++)
            {
                if (reserverecord.books[i].book_id == isbn3.Text)
                {
                    reserverecord.books[i].res_amount += Convert.ToInt32(amount.Text);
                    showrevbooks();
                    return;
                }
            }
            book_sell book = new book_sell(isbn3.Text);

            book.reserve(Convert.ToInt32(amount.Text));
            reserverecord.books.Add(book);
            showrevbooks();
        }
        void addbook(string isbn, int number)
        {
            int  imark = 0;
            bool bmark = true;

            //查找是否已有该书,若有,则直接加上购买数
            for (int i = 0; i < traderecord.books.Count; i++)
            {
                if (traderecord.books[i].book_id == isbn)
                {
                    traderecord.books[i].sell_amount += number;
                    if (traderecord.books[i].sell_amount > traderecord.books[i].left_amount)
                    {
                        bmark = false; traderecord.books[i].sell_amount -= number;
                    }
                    imark = 1;
                    break;
                }
            }
            //若没有,新建书籍记录并添加
            if (imark == 0)
            {
                book_sell book = new book_sell(isbn);
                book.sell(number);
                if (book.left_amount < book.sell_amount)
                {
                    bmark = false;
                }
                else
                {
                    traderecord.books.Add(book);
                }
            }
            if (bmark)
            {
                showbooks();
            }
            else
            {
                MessageBox.Show("库存不足!"); //购买量大于库存时,显示库存不足
            }
        }