private void buttonSearchBarcode_Click(object sender, EventArgs e) { try { this.comboSearchBarcode.Text = this.comboSearchBarcode.Text.Trim(); if (this.comboSearchBarcode.Text.Length > 0 && (this.comboSearchBarcode.Text != this.searchPlaceHolder)) { if (this.comboSearchBarcode.Items.IndexOf(this.comboSearchBarcode.Text) == -1) { this.comboSearchBarcode.Items.Add(this.comboSearchBarcode.Text); } SearchBarcode searchBarcode = new SearchBarcode(this.comboSearchBarcode.Text); DialogResult dialogResult = searchBarcode.ShowDialog(); searchBarcode.Dispose(); if (dialogResult == System.Windows.Forms.DialogResult.Yes) { SmartCoding activeSmartCoding = ActiveMdiChild as SmartCoding; if (activeSmartCoding != null) { activeSmartCoding.ReprintCarton(GlobalEnums.ReprintCartonID); } } } } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
private void buttonSearchBarcode_Click(object sender, EventArgs e) { try { this.comboSearchBarcode.Text = this.comboSearchBarcode.Text.Trim(); if (this.comboSearchBarcode.Text.Length > 0 && (this.comboSearchBarcode.Text != this.searchPlaceHolder)) { if (this.comboSearchBarcode.Items.IndexOf(this.comboSearchBarcode.Text) == -1) { this.comboSearchBarcode.Items.Add(this.comboSearchBarcode.Text); } SearchBarcode quickView = new SearchBarcode(this.comboSearchBarcode.Text); quickView.ShowDialog(); quickView.Dispose(); } } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }