/// <summary> /// 扫描条码 /// </summary> private void ScanBarCode() { try { tabOrderManager.Reset(); string barcode = txtBarCode.Text.Trim(); if (string.IsNullOrEmpty(barcode)) { return; } BarCodeInfoDTO dto = ServiceAgent.Agent.QueryBarCodeInfo(PDAContext.LoginOrgID, barcode); mainInvCheckRow = dataSet.InvCheckBarCode.AddNewRow(dto); if (mainInvCheckRow == null) { throw new PDAException(txtBarCode, "没有找到该条形码的料品信息!"); } // 料品信息 txtInfo.Text = mainInvCheckRow.ToString(); // 显示行数 ShowRowCount(); // 焦点定位到最后一行 this.dataGrid1.Focus(); this.dataGrid1.CurrentRowIndex = this.dataSet.InvCheckBarCode.Count - 1; // 跳转到下一个控件 tabOrderManager.Next(); } catch (Exception ex) { MessageBox.Show(ExceptionParser.ParseError(ex)); tabOrderManager.DealException(ex); } }
public override void ProcessHotkey(Keys hotKey) { if (hotKey == TabOrderManager.TabOrderKey) { tabOrderManager.Next(); } base.ProcessHotkey(hotKey); }
public override void ProcessHotkey(Keys hotKey) { if (hotKey == TabOrderManager.TabOrderKey) { tabOrderManager.Next(); } else if (hotKey == Keys.F10) { llOptions_Click(null, null); } base.ProcessHotkey(hotKey); }
/// <summary> /// 扫描单号 /// </summary> private void ScanDocNo() { try { string barcode = txtDocNo.Text.Trim(); if (string.IsNullOrEmpty(barcode)) { return; } BuildTabOrder(true); tabOrderManager.Reset(); if (dataSet.ShipBarCode.Rows.Count > 0 && MessageBox.Show("存在未提交的条形码,是否确定重新录入出货计划单号?", "确定重新扫单", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.OK) { tabOrderManager.Next(); return; } txtBarCode.Text = ""; txtInfo.Text = ""; dataSet.ShipBarCode.Clear(); mainRow = null; docInfoArray = ServiceAgent.Agent.QueryShipPlanDocInfo(PDAContext.LoginOrgID, barcode); if (docInfoArray == null || docInfoArray.Length == 0) { throw new PDAException(txtDocNo, "没有找到该条码对应出货计划信息或者该出货计划单已经完全出库!"); } ShowInfo(); tabOrderManager.Next(); } catch (Exception ex) { MessageBox.Show(ExceptionParser.ParseError(ex)); tabOrderManager.DealException(ex); } }