Exemple #1
0
        public override void ButtonClick(ButtonClickEventArgs e)
        {
            base.ButtonClick(e);

            if (e.Key.EqualsIgnoreCase("F_HS_Confirm"))
            {
                try
                {
                    string printerName = GetSelectedPrinterName();

                    if (numbers != null && numbers.Count > 0)
                    {
                        foreach (var num in numbers)
                        {
                            if (num != null)
                            {
                                PrintUtil.Print("C:\\Fedex\\" + num + ".pdf", printerName);
                            }
                        }
                    }

                    this.View.Close();
                }
                catch (Exception ex)
                {
                    this.View.ShowErrMessage(ex.Message + Environment.NewLine + ex.StackTrace, "", MessageBoxType.Error);
                }
            }
            else if (e.Key.EqualsIgnoreCase("F_HS_Cancel"))
            {
                this.View.Close();
            }
        }