コード例 #1
0
 private void btnYCT_Click(object sender, EventArgs e)
 {
     if (_ChargeRecord != null && CheckPaid())
     {
         CommandResult result = null;
         FrmYCTPayment frmYCT = new FrmYCTPayment();
         frmYCT.Reader  = this._YCTReader;
         frmYCT.Payment = this.txtPaid.DecimalValue;
         if (frmYCT.ShowDialog() == DialogResult.OK)
         {
             result = SaveCardPayment(PaymentMode.YangChengTong);
         }
         if (result != null)
         {
             if (result.Result == ResultCode.Successful)
             {
                 //用于打印收费小票打开钱箱收款
                 if (_BillPrinter != null)
                 {
                     ParkBillInfo bill = ParkBillFactory.CreateParkBill(_ChargeRecord);
                     _BillPrinter.PrintParkBill(bill);
                 }
                 ClearInput();
             }
             else
             {
                 MessageBox.Show(result.Message);
             }
         }
     }
 }
コード例 #2
0
 private void btnYCT_Click(object sender, EventArgs e)
 {
     if (_processingEvent != null && CheckPaid())
     {
         CommandResult result = null;
         if (btnYCT.Text.Contains("中山通"))
         {
             FrmZSTPayment frmZST = new FrmZSTPayment();
             frmZST.Payment = this.txtPaid.DecimalValue;
             if (frmZST.ShowDialog() == DialogResult.OK)
             {
                 result = SaveCardPayment(_processingEvent.CardPaymentInfo, PaymentMode.ZhongShanTong);
             }
         }
         else
         {
             FrmYCTPayment frmYCT = new FrmYCTPayment();
             frmYCT.Reader  = this._YCTReader;
             frmYCT.Payment = this.txtPaid.DecimalValue;
             if (frmYCT.ShowDialog() == DialogResult.OK)
             {
                 result = SaveCardPayment(_processingEvent.CardPaymentInfo, PaymentMode.YangChengTong);
             }
         }
         if (result != null)
         {
             if (result.Result == ResultCode.Successful)
             {
                 //用于打印收费小票打开钱箱收款
                 if (_BillPrinter != null)
                 {
                     ParkBillInfo bill = ParkBillFactory.CreateParkBill(_processingEvent.CardPaymentInfo);
                     _BillPrinter.PrintParkBill(bill);
                 }
                 CardPaidOk();
             }
             else
             {
                 MessageBox.Show(result.Message);
             }
         }
     }
 }