private void txbCarton_TextChanged(object sender, EventArgs e) { string labelBarcode = txbCarton.Text; try { if (labelBarcode.Length == ARGIX_BARCODE_LENGTH) { //validate if (labelBarcode.Substring(0, 3) != CLIENT_NUMBER_VALIDATION) { throw new Exception("Not valid client number"); } if (Convert.ToInt32(labelBarcode.Substring(5, 5)) != mPallet.Store) { throw new Exception("Not valid store number"); } // sort SortBMCFactory.PalletCartonNew(mPallet.LabelSequenceNumber, labelBarcode.Substring(10, 13)); // update ui if (lsbCartons.Items.Count == 5) { lsbCartons.Items.RemoveAt(0); } lsbCartons.Items.Add(txbCarton.Text); txbCarton.Text = ""; } } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Warning); txbCarton.SelectAll(); } }
private void txbDeleteCarton_TextChanged(object sender, EventArgs e) { try { if (txbDeleteCarton.Text.Length == ARGIX_BARCODE_LENGTH) { SortBMCFactory.PalletCartonDelete(txbDeleteCarton.Text.Substring(10, 13)); this.btnRemoveCaronCancel_Click(null, null); } } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Warning); } }
private void txbPallet_TextChanged(object sender, EventArgs e) { if (txbPallet.Text.Length == ARGIX_BARCODE_LENGTH) { try { mPallet = SortBMCFactory.GetPallet(txbPallet.Text.Substring(10, 13)); if (mPallet == null) { throw new Exception("Pallet " + txbPallet.Text + " not found or not available for sort"); } updatePalletFields(); //Pallet good - startscanning cartons this.userProcess = USER_PROCESS_SCAN_CARTON; } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Warning); } this.adjustUIProcessFields(); } }