Exemplo n.º 1
0
        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);
            }
        }