/// <summary> /// 预览数据 /// </summary> /// <param name="strType">操作类型,0为预览,1为双击单元格</param> private void ViewData(string strType = "0") { if (strType == "0") { if (!IsCheck("预览")) { return; } } UCOldPartsSendView view = new UCOldPartsSendView(strReId); view.uc = this; base.addUserControl(view, "旧件发货单-预览", "view" + strReId, this.Tag.ToString(), this.Name); }
/// <summary> /// 双击datagridview单元格进入浏览窗体 /// </summary> /// <param name="dgvView">双击的datagridview</param> /// <param name="strIdName">datagridview中数据Id的name</param> private void DoubleClickCell(DataGridView dgvView, string strIdName) { if (dgvView.CurrentRow == null) { return; } strReId = dgvView.CurrentRow.Cells[strIdName].Value.ToString(); UCOldPartsSendView view = new UCOldPartsSendView(strReId); base.addUserControl(view, "旧件发货单-预览", "view" + strReId, this.Tag.ToString(), this.Name); }
/// <summary> /// 根据选型卡切换判断是哪个选选项卡而执行预览 /// </summary> private void DataView() { string strTabTag = tcQuery.SelectedIndex.ToString();//0为按旧件发货单查询,1为按配件查询旧件发货单 if (strTabTag == "0") { if (!IsCheck(dgvRData, strTabTag)) { return; } } else if (strTabTag == "1") { if (!IsCheck(dgvPartsData, strTabTag)) { return; } } UCOldPartsSendView Qview = new UCOldPartsSendView(strReId); base.addUserControl(Qview, "旧件发货单-预览", "Qview" + strReId, this.Tag.ToString(), this.Name); }