示例#1
0
 /// <summary>
 /// 显示图书的详细信息
 /// </summary>
 private void DisplayBookInfo()
 {
     if (this.dataGridView1.SelectedRows.Count != 0)
     {
         FmBookInfo bookinfo = new FmBookInfo(false);
         bookinfo.bookid.Text = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString().Trim();
         bookinfo.ShowDialog();
     }
 }
示例#2
0
 private void dataGridView1_DoubleClick(object sender, EventArgs e)//双击显示详细信息
 {
     if (this.book.Checked)
     {
         if (this.dataGridView1.SelectedRows.Count != 0)
         {
             FmBookInfo bookinfo = new FmBookInfo(true);
             bookinfo.bookid.Text = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString().Trim();
             bookinfo.ShowDialog();
         }
     }
     else
     {
         if (this.dataGridView1.SelectedRows.Count != 0)
         {
             FmCdInfo cdinfo = new FmCdInfo(true);
             cdinfo.cdid.Text = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString().Trim();
             cdinfo.ShowDialog();
         }
     }
 }