private void reader_PaymentOk(object sender, ZSTReaderEventArgs e) { ZSTHandlerInfo zst = _HandlerInfoes.SingleOrDefault(item => item.ReaderIP == e.ReaderIP); if (zst != null && zst.ProcessingEvent != null) { if (zst.ProcessingEvent.CardPaymentInfo != null) { zst.ProcessingEvent.CardPaymentInfo.Paid = zst.ProcessingEvent.CardPaymentInfo.Accounts; zst.ProcessingEvent.CardPaymentInfo.Discount = zst.ProcessingEvent.CardPaymentInfo.Accounts - zst.ProcessingEvent.CardPaymentInfo.Paid; zst.ProcessingEvent.CardPaymentInfo.PaymentMode = PaymentMode.ZhongShanTong; zst.ProcessingEvent.CardPaymentInfo.OperatorID = OperatorInfo.CurrentOperator.OperatorName; zst.ProcessingEvent.CardPaymentInfo.StationID = WorkStationInfo.CurrentStation.StationName; zst.ProcessingEvent.CardPaymentInfo.IsCenterCharge = false; CommandResult ret = (new CardBll(AppSettings.CurrentSetting.ParkConnect)).PayParkFee(zst.ProcessingEvent.CardPaymentInfo); } IParkingAdapter pad = ParkingAdapterManager.Instance[zst.ProcessingEvent.ParkID]; if (pad != null) { EventValidNotify n = new EventValidNotify(zst.ProcessingEvent.EntranceID, OperatorInfo.CurrentOperator, WorkStationInfo.CurrentStation.StationName, 0); pad.EventValid(n); } zst.ClearCardInfo(); //清空读卡器内的卡片信息 } }
public bool EventValid(EventValidNotify notify) { try { if (_Channel != null) { return(_Channel.EventValid(notify)); } } catch (CommunicationException) { if (ParkAdapterConnectFail != null) { ParkAdapterConnectFail(this, EventArgs.Empty); } } catch (Exception ex) { Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex); } return(false); }