private void cmbBillType_SelectedIndexChanged(object sender, EventArgs e) { if (lblBillStatus.Text == "新建单据" && dataGridView1.Rows.Count == 0 && txtFrockNumber.Text.Trim().Length != 0) { DataTable tempTable = m_serverFrockStandingBook.GetCheckItemsContent(txtFrockNumber.Text); if (tempTable != null && tempTable.Rows.Count > 0) { DataTable tempTable1 = (DataTable)dataGridView1.DataSource; foreach (DataRow dr in tempTable.Rows) { DataRow tempRow = tempTable1.NewRow(); tempRow["AskContent"] = dr["检测项目"]; tempRow["AttachedType"] = "检验"; tempTable1.Rows.Add(tempRow); } dataGridView1.DataSource = tempTable1; } } }
/// <summary> /// 显示信息 /// </summary> void ShowMessage() { if (m_lnqStandingBook != null) { View_F_GoodsPlanCost tempGoodsLnq = UniversalFunction.GetGoodsInfo(Convert.ToInt32(m_lnqStandingBook.GoodsID)); View_F_GoodsPlanCost tempParentGoodsLnq = UniversalFunction.GetGoodsInfo(Convert.ToInt32(m_lnqStandingBook.ParentGoodsID)); if (tempParentGoodsLnq != null) { txtParentCode.Text = tempParentGoodsLnq.图号型号; txtParentName.Text = tempParentGoodsLnq.物品名称; txtParentName.Tag = Convert.ToInt32(m_lnqStandingBook.ParentGoodsID); txtParentFrockNumber.Text = m_lnqStandingBook.ParentFrockNumber; } if (tempGoodsLnq == null) { MessageDialog.ShowPromptMessage("系统中无此物品信息"); } txtCode.Text = tempGoodsLnq.图号型号; txtName.Text = tempGoodsLnq.物品名称; txtName.Tag = Convert.ToInt32(m_lnqStandingBook.GoodsID); txtFrockNumber.Text = m_lnqStandingBook.FrockNumber; chkIsInStock.Checked = m_lnqStandingBook.IsInStock; txtScarpBillID.Text = m_lnqStandingBook.ScarpBillID; txtScarpReason.Text = m_lnqStandingBook.ScarpReason; lbScarpPersonnel.Text = m_lnqStandingBook.ScarpPersonnel; lbScarpTime.Text = m_lnqStandingBook.ScarpTime.ToString(); numIdentifyCycle.Value = Convert.ToDecimal(m_lnqStandingBook.IdentifyCycle); txtApplyToDevice.Text = m_lnqStandingBook.ApplyToDevice; txtApplyToProcess.Text = m_lnqStandingBook.ApplyToProcess; txtApplyToProductCode.Text = m_lnqStandingBook.ApplyToProductCode; txtApplyToProductName.Text = m_lnqStandingBook.ApplyToProductName; txtDesigner.Text = m_lnqStandingBook.Designer; cmbApplyToWorkShop.Text = m_lnqStandingBook.ApplyToWorkShop; _ApplicableGoods = m_serverFrockStandingBook.GetApplicableGoods(m_lnqStandingBook.FrockNumber); if (m_lnqStandingBook.IdentifyCycleType != null) { rbTypeCount.Checked = (bool)(m_lnqStandingBook.IdentifyCycleType == rbTypeCount.Text); rbTypeTime.Checked = (bool)(m_lnqStandingBook.IdentifyCycleType == rbTypeTime.Text); } } dgvFrockReport.DataSource = m_serverFrockStandingBook.GetProvingReport( Convert.ToInt32(txtName.Tag), txtFrockNumber.Text); dgvDispensingInfo.DataSource = m_serverFrockStandingBook.GetSplitCharging( Convert.ToInt32(txtName.Tag), txtFrockNumber.Text, chkIsShowDispensing.Checked); dgvCheckOutItems.DataSource = m_serverFrockStandingBook.GetCheckItemsContent(txtFrockNumber.Text); dgvCheckOutItems.Columns[0].Width = 250; dgvOperationBillInfo.DataSource = m_serverFrockStandingBook.GetFrockOperation(Convert.ToInt32(txtName.Tag), txtFrockNumber.Text); dgvRepairInfo.DataSource = m_serverFrockStandingBook.GetServiceTable(Convert.ToInt32(txtName.Tag), txtFrockNumber.Text); }