public static FormatExMessage ( string message ) : string | ||
message | string | |
return | string |
protected virtual void OrderConfirm() { try { if (Utility.IsHasTransformerDetail(this.resolver)) { this.isKeyUp = false; this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK; this.resolver = TheSmartDeviceMgr.ScanBarcode(this.resolver); this.lblMessage.Text = this.resolver.Result; this.lblMessage.Visible = true; this.InitialAll(); } else { this.btnHidden.Focus(); Utility.ShowMessageBox("明细不能为空"); } } catch (SoapException ex) { this.btnHidden.Focus(); this.lblMessage.Text = Utility.FormatExMessage(ex.Message); this.lblMessage.Visible = true; Utility.ShowMessageBox(ex.Message); } catch (Exception ex) { this.InitialAll(); this.btnHidden.Focus(); Utility.ShowMessageBox(ex.Message); } }
private void ShowHuStatus() { try { this.dgList.Visible = false; this.resolver.Input = this.tbBarCode.Text.Trim(); if (this.resolver.Input != string.Empty) { this.resolver = TheSmartDeviceMgr.ScanBarcode(this.resolver); if (this.resolver.Transformers != null && this.resolver.Transformers.Length == 1 && this.resolver.Transformers[0].TransformerDetails != null && this.resolver.Transformers[0].TransformerDetails.Length == 1) { TransformerDetail t = this.resolver.Transformers[0].TransformerDetails[0]; //string text = "条码信息: \n条码:" // + t.HuId + "\n物料代码:" + t.ItemCode // + "\n物料描述:" + t.ItemDescription + "\n数量:" + t.Qty.ToString("0.########") // + "\n批号:" + t.LotNo + "\n库位:" + t.LocationCode + "\n状态:" + t.Status; //string caption = "条码信息:"; //MessageBox.Show(text, caption); this.lblMessage.Text = "条码状态信息:"; this.lblHuId.Text = "编号:" + t.HuId; this.lblItemCode.Text = "物料代码:" + t.ItemCode; this.lblItemDescription.Text = "物料描述:" + t.ItemDescription; this.lblQty.Text = "数量:" + t.Qty.ToString("0.########"); this.lblLotNo.Text = "批号:" + t.LotNo; this.lblLocationCode.Text = "库位:" + t.LocationCode; this.lblBinCode.Text = "库格:" + t.StorageBinCode; this.lblStatus.Text = "状态:" + t.Status; if (t.Status != BusinessConstants.CODE_MASTER_HU_STATUS_VALUE_INVENTORY) { this.lblMessage.ForeColor = Color.Red; this.lblHuId.ForeColor = Color.Red; this.lblItemCode.ForeColor = Color.Red; this.lblItemDescription.ForeColor = Color.Red; this.lblQty.ForeColor = Color.Red; this.lblLotNo.ForeColor = Color.Red; this.lblLocationCode.ForeColor = Color.Red; this.lblStatus.ForeColor = Color.Red; } else { this.lblMessage.ForeColor = Color.Black; this.lblHuId.ForeColor = Color.Black; this.lblItemCode.ForeColor = Color.Black; this.lblItemDescription.ForeColor = Color.Black; this.lblQty.ForeColor = Color.Black; this.lblLotNo.ForeColor = Color.Black; this.lblLocationCode.ForeColor = Color.Black; this.lblStatus.ForeColor = Color.Black; } this.resolver.Transformers[0].TransformerDetails = null; this.tbBarCode.Text = string.Empty; this.tbBarCode.Focus(); } } } catch (Exception ex) { this.lblMessage.Text = Utility.FormatExMessage(ex.Message); this.lblMessage.Visible = true; Utility.ShowMessageBox(ex.Message); this.resolver.Transformers = null; this.tbBarCode.Focus(); this.tbBarCode.Text = string.Empty; } }