public static IsHasTransformer ( |
||
resolver | ||
Résultat | bool |
protected virtual void gvHuListDataBind() { this.gvHuList.Visible = true; this.gvList.Visible = false; List <TransformerDetail> transformerDetailList = new List <TransformerDetail>(); //if (this.resolver.Transformers != null && this.resolver.Transformers.Length == 1 // && this.resolver.Transformers[0].TransformerDetails != null && this.resolver.Transformers[0].TransformerDetails.Length > 0) //{ // transformerDetailList = this.resolver.Transformers[0].TransformerDetails; //} if (Utility.IsHasTransformer(resolver)) { foreach (Transformer transformer in resolver.Transformers) { if (transformer.TransformerDetails != null) { foreach (TransformerDetail transformerDetail in transformer.TransformerDetails) { if (transformerDetail.CurrentQty != 0) { transformerDetailList.Add(transformerDetail); } } } } } this.gvHuList.DataSource = new BindingList <TransformerDetail>(transformerDetailList); this.gvHuList.ClearSelection(); // this.lblMessage.Text = this.resolver.Result; this.tbBarCode.Text = string.Empty; }
protected virtual void OrderConfirm() { try { if (!Utility.IsHasTransformer(this.resolver)) { this.DataBind(); this.lblMessage.Text = "明细不能为空"; this.tbBarCode.Focus(); return; } Utility.RemoveLot(resolver); this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK; this.resolver = TheClientMgr.ScanBarcode(this.resolver); this.lblMessage.Text = this.resolver.Result; InitialAll(); } catch (FaultException ex) { this.DataBind(); this.lblMessage.Text = Utility.FormatExMessage(ex.Message); MessageBox.Show(this, Utility.FormatExMessage(ex.Message)); this.tbBarCode.Focus(); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error); InitialAll(); } }
protected override void OrderConfirm() { try { if (!Utility.IsHasTransformer(this.resolver)) { this.lblMessage.Text = "工单明细不能为空"; this.tbBarCode.Focus(); return; } MessageBoxButtons messageBoxButtons = MessageBoxButtons.OKCancel; MessageBoxDefaultButton messageBoxDefaultButton = MessageBoxDefaultButton.Button2; if (this.IsOdd) { messageBoxButtons = MessageBoxButtons.YesNoCancel; messageBoxDefaultButton = MessageBoxDefaultButton.Button3; } DialogResult dialogResult = MessageBox.Show(this, message, caption, messageBoxButtons, MessageBoxIcon.Question, messageBoxDefaultButton); switch (dialogResult) { case DialogResult.Cancel: break; case DialogResult.OK: case DialogResult.Yes: this.resolver.IsOddCreateHu = true; this.OrderOffline(); break; case DialogResult.No: this.resolver.IsOddCreateHu = false; this.OrderOffline(); break; default: break; } } catch (FaultException ex) { this.lblMessage.Text = Utility.FormatExMessage(ex.Message); MessageBox.Show(this, Utility.FormatExMessage(ex.Message)); this.tbBarCode.Focus(); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "程序内部错误,请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error); InitialAll(); } }
private void BarCodeScan() { try { if (Utility.IsHasTransformer(this.resolver) && this.tbBarCode.Text.Trim() == string.Empty) { if (this.resolver.IOType == BusinessConstants.IO_TYPE_IN) { this.resolver.IOType = BusinessConstants.IO_TYPE_OUT; this.lblBarCode.Text = "拆箱后条码"; this.tbBarCode.Focus(); } else if (this.resolver.Transformers[1] != null && this.resolver.Transformers[1].TransformerDetails != null && this.resolver.Transformers[1].TransformerDetails.Length > 0) { this.btnDevanning.Focus(); } return; } if (this.tbBarCode.Text.Trim() == string.Empty) { return; } this.tbBarCode.Text = this.tbBarCode.Text.Trim(); this.resolver.Input = this.tbBarCode.Text; this.resolver.UserCode = this.user.Code; this.resolver.ModuleType = BusinessConstants.TRANSFORMER_MODULE_TYPE_DEVANNING; this.resolver = TheClientMgr.ScanBarcode(this.resolver); this.BindTransformer(); } catch (FaultException ex) { MessageBox.Show(this, Utility.FormatExMessage(ex.Message), "获取扫条码信息失败!", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.tbBarCode.Text = string.Empty; this.tbBarCode.Focus(); this.lblMessage.Text = Utility.FormatExMessage(ex.Message); this.lblMessage.ForeColor = Color.Red; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "程序内部错误, 请与管理员联系", MessageBoxButtons.OK, MessageBoxIcon.Error); this.InitialAll(); } }
private void OrderOffline() { if (!Utility.IsHasTransformer(this.resolver)) { this.lblMessage.Text = "明细不能为空"; this.tbBarCode.Focus(); return; } Utility.RemoveLot(resolver); this.resolver.PrintUrl = string.Empty; this.resolver.Input = BusinessConstants.BARCODE_SPECIAL_MARK + BusinessConstants.BARCODE_HEAD_OK; this.resolver = TheClientMgr.ScanBarcode(this.resolver); if (this.resolver.AutoPrintHu && this.resolver.PrintUrl != null && this.resolver.PrintUrl != string.Empty) { Utility.PrintOrder(this.resolver.PrintUrl, this, null); } this.lblMessage.Text = this.resolver.Result; InitialAll(); }