Пример #1
0
        /// <summary>
        /// 进入借书界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBorrow_Click(object sender, EventArgs e)
        {
            if (this.dgvBook.SelectedRows.Count != 0)
            {
                this.Hide();
                BorrowBook borrowBook = new BorrowBook(this,
                                                       dgvBook.SelectedCells[0].Value.ToString(), correctID,
                                                       dgvBook.SelectedCells[1].Value.ToString(),
                                                       dgvBook.SelectedCells[2].Value.ToString(),
                                                       dgvBook.SelectedCells[3].Value.ToString(),
                                                       dgvBook.SelectedCells[4].Value.ToString(),
                                                       dgvBook.SelectedCells[5].Value.ToString(),
                                                       dgvBook.SelectedCells[6].Value.ToString(),
                                                       dgvBook.SelectedCells[7].Value.ToString());

                borrowBook.Show();
            }
            else
            {
                MessageBox.Show("请选择要借阅的图书!");
            }
        }
Пример #2
0
        /// <summary>
        /// 进入借书界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnBorrow_Click(object sender, EventArgs e)
        {
            if(this.dgvBook.SelectedRows.Count != 0)
            {
                this.Hide();
                BorrowBook borrowBook = new BorrowBook(this,
                                                       dgvBook.SelectedCells[0].Value.ToString() , correctID,
                                                       dgvBook.SelectedCells[1].Value.ToString(),
                                                       dgvBook.SelectedCells[2].Value.ToString(),
                                                       dgvBook.SelectedCells[3].Value.ToString(),
                                                       dgvBook.SelectedCells[4].Value.ToString(),
                                                       dgvBook.SelectedCells[5].Value.ToString(),
                                                       dgvBook.SelectedCells[6].Value.ToString(),
                                                       dgvBook.SelectedCells[7].Value.ToString());

                borrowBook.Show();
            }
            else
            {
                MessageBox.Show("请选择要借阅的图书!");
            }
        }