void 图号型号_m_OnCompleteSearch() { DataRow drTemp = this.图号型号.DataResult; if (drTemp != null) { customDataGridView1.CurrentRow.Cells["物品名称"].Value = drTemp["物品名称"]; customDataGridView1.CurrentRow.Cells["规格"].Value = drTemp["规格"]; customDataGridView1.CurrentRow.Cells["物品ID"].Value = drTemp["序号"]; customDataGridView1.CurrentRow.Cells["单位"].Value = drTemp["单位"]; ((DataGridViewTextBoxShowCell)customDataGridView1.CurrentRow.Cells["批次号"]).m_EndSql = " and 物品ID = " + (int)drTemp["序号"]; IBasicGoodsServer goodsService = SCM_Level01_ServerFactory.GetServerModule <IBasicGoodsServer>(); F_GoodsAttributeRecord record = goodsService.GetGoodsAttirbuteRecord(Convert.ToInt32(drTemp["序号"]), Convert.ToInt32(CE_GoodsAttributeName.来料须依据检验结果入库)); if (record != null) { customDataGridView1.CurrentRow.Cells["检验报告"].Value = Convert.ToBoolean(record.AttributeValue); } } }
public List <View_Business_WarehouseInPut_RequisitionDetail> GetListViewDetail_OrderForm(string billNo, List <string> listOrderForm) { List <View_Business_WarehouseInPut_RequisitionDetail> listResult = new List <View_Business_WarehouseInPut_RequisitionDetail>(); string orderFormNum = ""; foreach (string item in listOrderForm) { orderFormNum += "'" + item + "',"; } orderFormNum = orderFormNum.Substring(0, orderFormNum.Length - 1); string strSql = " select a.订单号, b.物品ID , b.图号型号, b.物品名称 ,b.规格, " + " a.供货单位, b.订货数量, c.单位 from View_B_OrderFormInfo as a " + " inner join View_B_OrderFormGoods as b on a.订单号 = b.订单号 " + " inner join View_F_GoodsPlanCost as c on b.物品ID = c.序号 where a.订单号 in (" + orderFormNum + ")"; DataTable dtTemp = GlobalObject.DatabaseServer.QueryInfo(strSql); foreach (DataRow dr in dtTemp.Rows) { View_Business_WarehouseInPut_RequisitionDetail tempLnq = new View_Business_WarehouseInPut_RequisitionDetail(); tempLnq.单据号 = billNo; tempLnq.单位 = dr["单位"].ToString(); tempLnq.供应商 = dr["供货单位"].ToString(); tempLnq.关联业务 = dr["订单号"].ToString(); tempLnq.物品ID = (int)dr["物品ID"]; tempLnq.图号型号 = dr["图号型号"].ToString(); tempLnq.物品名称 = dr["物品名称"].ToString(); tempLnq.规格 = dr["规格"].ToString(); tempLnq.数量 = (decimal)dr["订货数量"]; IBasicGoodsServer goodsService = SCM_Level01_ServerFactory.GetServerModule <IBasicGoodsServer>(); F_GoodsAttributeRecord record = goodsService.GetGoodsAttirbuteRecord(tempLnq.物品ID, Convert.ToInt32(CE_GoodsAttributeName.来料须依据检验结果入库)); if (record != null) { tempLnq.检验报告 = Convert.ToBoolean(record.AttributeValue); } listResult.Add(tempLnq); } return(listResult); }
/// <summary> /// 判断是否属于自制件 /// </summary> /// <param name="goodsID">物品ID</param> /// <returns>True 是, False 否</returns> public bool IsInHomemadePartInfo(int goodsID) { BasicGoodsServer goodsServer = new BasicGoodsServer(); F_GoodsAttributeRecord record = goodsServer.GetGoodsAttirbuteRecord(goodsID, 12); if (record != null && record.AttributeValue == "True") { return(true); } else { return(false); } }
/// <summary> /// 收集信息 /// </summary> void GetInfo() { m_lstRecord = new List <F_GoodsAttributeRecord>(); F_GoodsAttributeRecord tempRecord = new F_GoodsAttributeRecord(); m_goodsInfo = new F_GoodsPlanCost(); string TrueStr = System.Boolean.TrueString; m_goodsInfo.ID = m_goodsID == null ? 0 : (int)m_goodsID; m_goodsInfo.GoodsName = txtName.Text; m_goodsInfo.GoodsCode = txtCode.Text; m_goodsInfo.Spec = txtSpec.Text; m_goodsInfo.UnitID = Convert.ToInt32(cmbUnit.SelectedValue); m_goodsInfo.GoodsType = txtDepot.Tag.ToString(); m_goodsInfo.IsDisable = chbIsDisable.Checked; tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.物料价值ABC分类; tempRecord.AttributeValue = cmbGoodsValueABC.Text; m_lstRecord.Add(tempRecord); if (chbIsEol.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.停产; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbAssemblyUnit.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.部件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbBlank.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.毛坯; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); m_lstBlankToProductInfo = ((BindingList <View_F_GoodsBlankToProduct>)dataGridViewBlankToProduct.DataSource).ToList(); } if (chbCVT.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.CVT; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbGoodsTechnologyABC.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.技术等级ABC分类; tempRecord.AttributeValue = cmbGoodsTechnologyABC.Text; m_lstRecord.Add(tempRecord); } if (chbNeedDetection.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.来料须依据检验结果入库; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbOption.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.配件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbOutsourceGoods.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.委外加工; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbPart.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.零件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbProductionUse.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.生产耗用; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbPackageSending.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.整包发料; tempRecord.AttributeValue = "B_GoodsLeastPackAndStock"; tempRecord.IsHavingChildTable = true; m_lstRecord.Add(tempRecord); } if (chbPurchaseGoods.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.采购件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbReplace.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.替换件; tempRecord.AttributeValue = "F_GoodsReplaceInfo"; tempRecord.IsHavingChildTable = true; m_lstRecord.Add(tempRecord); m_lstReplaceInfo = ((BindingList <View_F_GoodsReplaceInfo>)dataGridViewReplace.DataSource).ToList(); } if (chbRustLife.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.防锈期; tempRecord.AttributeValue = numRustLife.Value.ToString(); m_lstRecord.Add(tempRecord); } if (chbSafeStock.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.安全库存; tempRecord.AttributeValue = numSafeStock.Value.ToString(); m_lstRecord.Add(tempRecord); } if (chbSelfmade.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.自制件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbShelfLife.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.保质期; tempRecord.AttributeValue = "KF_GoodsShelfLife"; tempRecord.IsHavingChildTable = true; m_lstRecord.Add(tempRecord); } if (chbBlank.Checked && chbStarvingBlank.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.缺料计算考虑毛坯; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbTCU.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.TCU; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (chbTopStock.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.最高库存; tempRecord.AttributeValue = numTopStock.Value.ToString(); m_lstRecord.Add(tempRecord); } if (chbVirtualPart.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.虚拟件; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); } if (num_CutterLife.Value > 0) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.刀具寿命; tempRecord.AttributeValue = num_CutterLife.Value.ToString(); m_lstRecord.Add(tempRecord); } if (num_PCS.Value > 0) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.装箱数; tempRecord.AttributeValue = num_PCS.Value.ToString(); m_lstRecord.Add(tempRecord); } if (chbWaterCode.Checked) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.流水码; tempRecord.AttributeValue = TrueStr; m_lstRecord.Add(tempRecord); m_lstWaterCode = ((BindingList <F_ProductWaterCode>)dataGridViewWaterCode.DataSource).ToList(); if (txtCSCODE.Text.Trim().Length > 0) { tempRecord = new F_GoodsAttributeRecord(); tempRecord.AttributeID = (int)CE_GoodsAttributeName.厂商编码; tempRecord.AttributeValue = txtCSCODE.Text; m_lstRecord.Add(tempRecord); } } }