//Yj2015.0226 Add 双击通用名显示图片 --- void dataGridViewX1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dataGridViewX1.Columns["Column1"].Index) { int goodsPackageId = 0; int goodsId = 0; if (int.TryParse(dataGridViewX1.Rows[e.RowIndex].Cells["Product_ID"].Value.ToString(), out goodsPackageId) && int.TryParse(dataGridViewX1.Rows[e.RowIndex].Cells["Goods_Id"].Value.ToString(), out goodsId)) { soso.syntoolSoapClient bll = new soso.syntoolSoapClient(); string imgUrl = bll.GetImageUrl(goodsId, goodsPackageId); string frmCaption = dataGridViewX1.Rows[e.RowIndex].Cells["Column1"].Value.ToString() + "—" + dataGridViewX1.Rows[e.RowIndex].Cells["Column2"].Value.ToString() + "—" + dataGridViewX1.Rows[e.RowIndex].Cells["Column4"].Value.ToString(); frmShowGoodsImage frmTmp = new frmShowGoodsImage(imgUrl); frmTmp.Text = frmCaption; frmTmp.Show(this); } else { MessageBox.Show("无有效的物品编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }