Exemple #1
0
        private void btn_add_book_Click(object sender, EventArgs e)
        {
            this.Hide();
            Add_Book add_book = new Add_Book();

            add_book.Show();
        }
        private void 书籍入库tSBtn_Click(object sender, EventArgs e)
        {
            Add_Book addbook = new Add_Book();

            addbook.type = "1";
            addbook.ShowDialog();
        }
        private void Edit_Book_Info_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.RowCount == 0)
            {
                MessageBox.Show("请先选择数据");
                return;
            }
            Add_Book edit = new Add_Book();

            edit.type = "2";

            // edit.select_ID = (string)dataGridView1.CurrentCell.Value;
            int a = dataGridView1.CurrentRow.Index;

            edit.select_ID = dataGridView1.Rows[a].Cells["书籍序列号"].Value.ToString();
            if ((string)dataGridView1.CurrentCell.Value == "")
            {
                MessageBox.Show("你没选中");
                return;
            }
            edit.ShowDialog();
        }
        private void 新书入库ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Add_Book add = new Add_Book();

            add.ShowDialog();
        }