/// <summary> /// 数据填充 /// </summary> void GetMessage() { m_lnqIslation.DJH = lbDJH.Text; m_lnqIslation.DJZT = lbDJZT.Text; m_lnqIslation.GoodsID = Convert.ToInt32(txtName.Tag); m_lnqIslation.Provider = txtProvider.Text; m_lnqIslation.BatchNo = txtBatchNo.Text; m_lnqIslation.StorageID = UniversalFunction.GetStorageID(cmbStorage.Text); m_lnqIslation.IsolateReason = txtReason.Text; m_lnqIslation.IsolateMeansAndAsk = txtMeansAndAsk.Text; m_lnqIslation.QC_BFS = NudQC_BF.Value; m_lnqIslation.QC_HGS = NudQC_HG.Value; m_lnqIslation.QC_RBS = NudQC_RB.Value; m_lnqIslation.QC_THS = NudQC_TH.Value; m_lnqIslation.QC_FQS = NudQC_FQ.Value; m_lnqIslation.SQE_BHGS = NudSQE_BHG.Value; m_lnqIslation.SQE_HGS = NudSQE_HG.Value; m_lnqIslation.SQE_CLGS = NudSQE_TFGS.Value; m_lnqIslation.CLBM = lbCLBM.Tag.ToString(); m_lnqIslation.QRSM = m_strAdutingMessage; m_lnqIslation.Amount = Convert.ToDecimal(m_serverStore.GetGoodsStockInfo(Convert.ToInt32(m_lnqIslation.GoodsID), m_lnqIslation.BatchNo, "", m_lnqIslation.StorageID).Rows[0]["ExistCount"]); m_lnqIslation.IsOutsourcing = chkIsOutsourcing.Checked; CheckRejectMode(); m_lnqIslation.RejectMode = m_strRejectMode; }
/// <summary> /// 设置本批总数 /// </summary> public void SetAllCount() { decimal dcCount = m_serverMess.GetAllCount(Convert.ToInt32(m_lnqViewCheck.物品ID), m_lnqViewCheck.批次号, m_lnqViewCheck.库房代码, out m_err); if (dcCount == 0) { DataTable dt = m_serverStore.GetGoodsStockInfo(Convert.ToInt32(m_lnqViewCheck.物品ID), m_lnqViewCheck.批次号, "", m_lnqViewCheck.库房代码); if (dt == null || dt.Rows.Count == 0) { numAllCount.Value = 0; } else { numAllCount.Value = Convert.ToDecimal(dt.Rows[0]["ExistCount"]); } } else { numAllCount.Value = dcCount; } }
private void btFind_Click(object sender, EventArgs e) { if (txtName.Tag == null || txtName.Tag.ToString() == "" || txtName.Text == "") { MessageDialog.ShowPromptMessage("请选择物品名称"); return; } else if (cmbStorage.Text == "") { MessageDialog.ShowPromptMessage("请选择所属库房"); return; } DataTable dt = m_serverStore.GetGoodsStockInfo(Convert.ToInt32(txtName.Tag), UniversalFunction.GetStorageID(cmbStorage.Text), 0); dataGridView1.DataSource = dt; }
/// <summary> /// 单击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgv_Main_Click(object sender, EventArgs e) { if (dgv_Main.CurrentRow == null) { return; } if (m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsID"].ToString() != "") { tbsGoods.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsName"].ToString(); tbsGoods.Tag = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsID"].ToString(); txtCount.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Count"].ToString(); txtSpce.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Spec"].ToString(); txtRemark.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Remark"].ToString(); txtUnitPrice.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["UnitPrice"].ToString(); txtBatchNo.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["BatchNo"].ToString(); lbUnit.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Unit"].ToString(); txtGoodsCode.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsCode"].ToString(); txtGoodsCode.Tag = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Depot"].ToString(); txtSpce.Tag = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Provider"].ToString(); if (m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["RepairStatus"].ToString() == "") { cmbProductStatus.SelectedIndex = -1; } else { cmbProductStatus.Text = Convert.ToInt32(m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["RepairStatus"]) == 1 ? "已返修" : "待返修"; } lbStock.Text = m_serverStore.GetGoodsStockInfo( Convert.ToInt32(m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsID"].ToString()), m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["BatchNo"].ToString(), m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Provider"].ToString(), UniversalFunction.GetStorageID(cmbOutStorage.Text)).Rows[0]["ExistCount"].ToString(); } }
private void dataGridView1_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow == null) { return; } else { txtName.Text = dataGridView1.CurrentRow.Cells["物品名称"].Value.ToString(); txtName.Tag = dataGridView1.CurrentRow.Cells["物品ID"].Value.ToString(); txtSpec.Text = dataGridView1.CurrentRow.Cells["规格"].Value.ToString(); txtCode.Text = dataGridView1.CurrentRow.Cells["图号型号"].Value.ToString(); txtCode.Tag = Convert.ToBoolean(dataGridView1.CurrentRow.Cells["是否为客户责任"].Value); txtBatchNo.Text = dataGridView1.CurrentRow.Cells["批次号"].Value.ToString(); txtBatchNo.Tag = dataGridView1.CurrentRow.Cells["单位"].Value.ToString(); numPickingCount.Value = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["领用数量"].Value); numPickingCount.Tag = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["单价"].Value); txtRemark.Text = dataGridView1.CurrentRow.Cells["备注"].Value.ToString(); View_S_Stock tempLnq = m_serverStore.GetGoodsStockInfo(Convert.ToInt32(txtName.Tag), txtBatchNo.Text); txtSpec.Tag = tempLnq == null ? 0 : tempLnq.库存数量; } }