111,131
社区成员
发帖
与我相关
我的任务
分享//查看单本图书
private void button6_Click(object sender, EventArgs e)
{
string bookid = textBox2.Text.Trim();
try
{
if (bookid == null)
{
MessageBox.Show("请输入图书编号!");
return;
}
else
{
DataSet rows = winLogin.GetBookInfo(bookid);
DataRow row = rows.Tables[0].Rows[0];
textBox8.Text = row["ISBN"].ToString();
textBox9.Text = row["BookName"].ToString();
textBox10.Text = row["Author"].ToString();
textBox6.Text = row["PulishDate"].ToString();
textBox11.Text = row["State"].ToString();
textBox7.Text = row["Pulisher"].ToString();
textBox12.Text = row["BookTypeName"].ToString();
}
}
catch
{
MessageBox.Show("没有您要找的书!");
}
//取消按钮
private void button7_Click(object sender, EventArgs e)
{
textBox2.Text = "";
textBox6.Text = "";
textBox7.Text = "";
textBox8.Text = "";
textBox9.Text = "";
textBox10.Text = "";
textBox11.Text = "";
textBox12.Text = "";
}