Ejemplo n.º 1
0
 private void receiptButton_Click(object sender, EventArgs e)
 {
     Properties.Settings setting = Properties.Settings.Default;
     if (!string.IsNullOrWhiteSpace(setting.receiptPrinter))
     {
         PrinterSettings ps = new PrinterSettings();
         ps.PrinterName = setting.receiptPrinter;
         printReceipt.PrinterSettings = ps;
         if (printReceipt.PrinterSettings.IsValid == true)
         {
             if (!orderDetail.getRejected() && orderDetail.getApprovedDate() != null)
             {
                 printReceipt.Print();
             }
         }
         else
         {
             MessageBox.Show(rs.GetString("nonSelectReceiptPrinterMsg"), rs.GetString("errorText"), MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show(rs.GetString("selectReceiptPrinterMsg"), "", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ReceiptPrinterSettingForm fm = new ReceiptPrinterSettingForm();
         fm.FormClosed += new FormClosedEventHandler(fm_Closed);
         fm.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        private void receiptPrinterSettingButton_Click(object sender, System.EventArgs e)
        {
            ReceiptPrinterSettingForm fm = new ReceiptPrinterSettingForm();

            fm.ShowDialog();
        }