/// <summary> /// 双击列表单元格事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gvWareHouseList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用 { string wareHouseId = Convert.ToString(this.dgvWareHouseList.CurrentRow.Cells["wh_id"].Value.ToString()); UCWareHouseView UCWareHouseView = new UCWareHouseView(wareHouseId); base.addUserControl(UCWareHouseView, "仓库档案-查看", "UCWareHouseView" + wareHouseId + "", this.Tag.ToString(), this.Name); } }
/// <summary> /// 双击列表单元格事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gvWareHouseList_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1)//双击表头或列头时不起作用 { string wareHouseId = Convert.ToString(this.gvWareHouseList.CurrentRow.Cells[0].Value.ToString()); UCWareHouseView UCWareHouseView = new UCWareHouseView(wareHouseId); base.addUserControl(UCWareHouseView, "仓库档案-查看", "UCWareHouseView" + wareHouseId + "", this.Tag.ToString(), this.Name); } }