protected virtual void OnCardDeniedReporting(CardInvalidEventReport report) { if (this.CardDeniedReporting != null) { this.CardDeniedReporting(this, report); } }
private void ShowSpeedingDetail(CardInvalidEventReport info) { ClearDetail(); CardBll cbll = new CardBll(AppSettings.CurrentSetting.ParkConnect); CardInfo card = cbll.GetCardByID(info.CardID).QueryObject; if (card == null) { return; //没找到卡片,返回 } this.lblCardID.Text = card.CardID; this.lblCarPlate.Text = card.CarPlate; this.lblOwner.Text = card.OwnerName; this.lblDepartment.Text = card.Department; if (!string.IsNullOrEmpty(card.CarPlate)) { SpeedingRecordBll sbll = new SpeedingRecordBll(AppSettings.CurrentSetting.ParkConnect); List <SpeedingRecord> records = sbll.GetRecordsByCarPlate(card.CarPlate).QueryObjects; ShowSpeedingRecords(records); } ucVideoes.ShowVideoes(ParkBuffer.Current.GetEntrance(info.EntranceID).VideoSources); }
private void btnClose_Click(object sender, EventArgs e) { ClearDetail(); _ProcessingEvent = null; this.ucVideoes.Clear(); this.Hide(); }
public void HandleReport(ReportBase report) { if (report is CardEventReport) { HandleCardEvent(report as CardEventReport); } else if (report is CardInvalidEventReport) { CardInvalidEventReport ci = report as CardInvalidEventReport; GlobalSettings.Current.Get <Dictionary <int, CardEventReport> >()[report.EntranceID] = new CardEventReport() { CardID = ci.CardID, EventDateTime = ci.EventDateTime, EntranceID = ci.EntranceID }; } }
private ReportBase DeformatCardInvalidPacket(Packet packet) { CardInvalidEventReport report = new CardInvalidEventReport(); report.Address = packet.Address; report.InvalidType = GetInvalidType(packet.Parameters[0]); try { if (report.InvalidType == EventInvalidType.INV_UnRegister) //卡片未注册 { report.CardID = ((uint)SEBinaryConverter.BytesToInt(packet.ReadDataFromParameter(1, 4))).ToString(); } } catch { } return(report); }
private void ReportSink(CardInvalidEventReport report) { List <IReportSinker> faultSinkers = new List <IReportSinker>(); foreach (IReportSinker reportSinker in _reportSinkers) { try { reportSinker.CardInvalidSink(report); } catch (Exception ex) { faultSinkers.Add(reportSinker); ExceptionPolicy.HandleException(ex); } } if (faultSinkers.Count > 0) { RemoveFaultSinkers(faultSinkers); } }
public void ProcessReport(BusinessModel.Report.ReportBase report) { EntranceInfo entrance = ParkBuffer.Current.GetEntrance(report.EntranceID); if (entrance == null) { return; } if (entrance.IsExitDevice) //处理出口 { if (report is CardEventReport) { CardEventReport cer = report as CardEventReport; if (cer.EventStatus == CardEventStatus.Pending) { ZSTHandlerInfo zst = GetZSTHandlerInstance(cer.EntranceID); if (zst != null && !string.IsNullOrEmpty(zst.CardID) && zst.CardID == cer.CardID) { if (zst.Balance >= cer.CardPaymentInfo.Accounts) { zst.ProcessingEvent = cer; _Reader.Consumption(zst.ReaderIP, cer.CardPaymentInfo.Accounts); //余额足够的话就直接扣款 IParkingAdapter pad = ParkingAdapterManager.Instance[cer.ParkID]; if (pad != null) { SetLedDisplayNotify notify = new SetLedDisplayNotify(entrance.ParkID, CanAddress.TicketBoxLed, string.Format("扣款{0}元", cer.CardPaymentInfo.Accounts), false, 0); pad.LedDisplay(notify); } } else { _Reader.MessageConfirm(zst.ReaderIP); //发送中山通读卡确认消息 zst.ClearCardInfo(); //清空读卡器内的卡片信息 IParkingAdapter pad = ParkingAdapterManager.Instance[cer.ParkID]; if (pad != null) { EventInvalidNotify n = new EventInvalidNotify() { InvalidType = EventInvalidType.INV_Balance, Balance = zst.Balance, CardEvent = cer }; pad.EventInvalid(n); } } } } else { ZSTHandlerInfo zst = GetZSTHandlerInstance(cer.EntranceID); if (zst != null && !string.IsNullOrEmpty(zst.CardID) && zst.CardID == cer.CardID) { _Reader.MessageConfirm(zst.ReaderIP); //发送中山通读卡确认消息 zst.ClearCardInfo(); //清空读卡器内的卡片信息 } } } else if (report is CardInvalidEventReport) { CardInvalidEventReport cier = report as CardInvalidEventReport; ZSTHandlerInfo zst = GetZSTHandlerInstance(report.EntranceID); if (zst != null && !string.IsNullOrEmpty(zst.CardID) && zst.CardID == cier.CardID) { _Reader.MessageConfirm(zst.ReaderIP); //发送中山通读卡确认消息 zst.ClearCardInfo(); //清空读卡器内的卡片信息 } } } }
private void park_CardInvalidReporting(object sender, CardInvalidEventReport report) { ReportEnqueue(report); }
private void CardInvalidHandler(CardInvalidEventReport report) { OnCardDeniedReporting(report); }