/// <summary> /// 根据领料项目号自动填充工单号、等级和供应商名称。 /// </summary> /// 领料日期(6) 电池供应商简码(3) 电池片效率(4) 电池片等级(1~2)- 电池片对角线(3)- 工单号(9) private void AutoInputValueByMaterialLot() { string val = txtMaterialLot.Text.Trim().ToUpper(); ReceiveMaterialEntity entity = new ReceiveMaterialEntity(); DataSet dsReturn = entity.GetReceiveMaterialLotInfo(val); if (!string.IsNullOrEmpty(entity.ErrorMsg)) { MessageService.ShowMessage(entity.ErrorMsg, StringParser.Parse("${res:Global.SystemInfo}")); } else { if (dsReturn.Tables[0].Rows.Count > 0) { DataTable dtReturn = dsReturn.Tables[0]; string workOrder = Convert.ToString(dtReturn.Rows[0]["AUFNR"]); string grade = Convert.ToString(dtReturn.Rows[0]["GRADE"]); string supplierCode = Convert.ToString(dtReturn.Rows[0]["SUPPLIER_CODE"]); string efficiency = Convert.ToString(dtReturn.Rows[0]["EFFICIENCY"]); //string proId = Convert.ToString(dtReturn.Rows[0]["PRO_ID"]); string supplierName = Convert.ToString(dtReturn.Rows[0]["LLIEF"]); string materialCode = Convert.ToString(dtReturn.Rows[0]["MATNR"]); string materialDesc = Convert.ToString(dtReturn.Rows[0]["MATXT"]); string materialKey = Convert.ToString(dtReturn.Rows[0]["MATERIAL_KEY"]); this.lueWorkOrderNo.EditValue = workOrder; //this.lueProId.EditValue = proId; this.lueEfficiency.EditValue = efficiency; this.teGrade.Text = grade; this.lueSupplierName.EditValue = supplierName; this.teSupplierCode.Text = supplierCode; this.lueMaterialCode.EditValue = materialKey; this.txtMaterialDescription.Text = materialDesc; DisableControl(); } else { string[] items = val.Split('-'); this.lueWorkOrderNo.EditValue = items[2]; //工单号 } } }