private void ShowCardPaymentDetail(CardEventReport info)
        {
            this.lblCardID.Text            = info.CardID;
            this.lblOwnerName.Text         = info.OwnerName;
            this.lblExitDateTime.Text      = info.EventDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblChargingMoneyPlan.Text = info.Accounts.ToString();
            this.lblCardType.Text          = info.CardType.ToString();
            this.lblChargeMoney.Text       = info.Paid.ToString();
            if (info.LastDateTime != null)
            {
                this.lblEnterDateTime.Text = info.LastDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
                this.lblParkingTime.Text   = info.ParkInterval;
                Image imgIn = SnapShotBll.GetFirstSnapShot(info.LastDateTime.Value);
                if (imgIn != null)
                {
                    this.picIn.Image = imgIn;
                }
            }
            Image imgOut = SnapShotBll.GetFirstSnapShot(info.EventDateTime);

            if (imgOut != null)
            {
                this.picOut.Image = imgOut;
            }
        }
        private void ShowFrmCarPlateFailDetail(CardEventReport info)
        {
            this.txtCardID.Text        = info.CardID;
            this.lblEnterCarPlate.Text = info.LastCarPlate;
            this.lblExitCarPlate.Text  = info.CarPlate;
            if (info.LastDateTime != null)
            {
                this.lblEnterDateTime.Text = info.LastDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            }
            this.lblExitDateTime.Text = info.EventDateTime.ToString("yyyy-MM-dd HH:mm:ss");

            SnapShotBll ssbll = new SnapShotBll(AppSettings.CurrentSetting.ParkConnect);

            this.picIn.Clear();
            if (info.LastDateTime != null)
            {
                List <SnapShot> imgs = ssbll.GetSnapShots(info.LastDateTime.Value, info.CardID);
                if (imgs != null && imgs.Count > 0)
                {
                    this.picIn.ShowSnapShots(imgs);
                }
            }

            this.picOut.Clear();
            if (info.EventDateTime != null)
            {
                List <SnapShot> outImgs = ssbll.GetSnapShots(info.EventDateTime, info.CardID);
                if (outImgs != null && outImgs.Count > 0)
                {
                    this.picOut.ShowSnapShots(outImgs);
                }
            }
            ucVideoes.ShowVideoes(ParkBuffer.Current.GetEntrance(info.EntranceID).VideoSources);
        }
Esempio n. 3
0
        public void ShowImage(DateTime snapshotDatetime, string cardID)
        {
            plEvent.Clear();
            plLastEvent.Clear();
            this.Text = string.Format("{0}", snapshotDatetime.ToString("yyyy-MM-dd HH:mm:ss"));
            SnapShotBll     bll   = ConnectStandby ? new SnapShotBll(AppSettings.CurrentSetting.CurrentStandbyConnect) : new SnapShotBll(AppSettings.CurrentSetting.ImageDBConnStr);
            List <SnapShot> shots = bll.GetSnapShots(snapshotDatetime, cardID);

            if (shots != null && shots.Count > 0)
            {
                plEvent.ShowSnapShots(shots);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 显示车牌名单的抓拍图片
 /// </summary>
 /// <param name="row"></param>
 private void ShowCarPlatListSnapShot(DataGridViewRow row)
 {
     if (row != null)
     {
         CardInfo card = row.Tag as CardInfo;
         if (card != null)
         {
             SnapShotBll     bll   = new SnapShotBll(AppSettings.CurrentSetting.ImageDBConnStr);
             List <SnapShot> shots = bll.GetSnapShots(card.LastDateTime, card.CardID);
             if (shots != null && shots.Count > 0)
             {
                 plEvent.ShowSnapShots(shots);
             }
         }
     }
 }
Esempio n. 5
0
        public void ShowImage(DateTime eventDateTime, DateTime lastEventDateTime, string cardID)
        {
            plEvent.Clear();
            plLastEvent.Clear();
            this.Text = string.Format("{0}", eventDateTime.ToString("yyyy-MM-dd HH:mm:ss"));
            SnapShotBll     bll   = ConnectStandby ? new SnapShotBll(AppSettings.CurrentSetting.CurrentStandbyConnect) : new SnapShotBll(AppSettings.CurrentSetting.ImageDBConnStr);
            List <SnapShot> items = bll.GetSnapShots(eventDateTime, cardID);

            if (items != null && items.Count > 0)
            {
                plEvent.ShowSnapShots(items);
            }

            List <SnapShot> items1 = bll.GetSnapShots(lastEventDateTime, cardID);

            if (items1 != null && items1.Count > 0)
            {
                plLastEvent.ShowSnapShots(items1);
            }
        }
Esempio n. 6
0
 private void ExportSnaphost_Thread()
 {
     try
     {
         SnapShotBll ssb = new SnapShotBll(Ralid.Park.BusinessModel.Configuration.AppSettings.CurrentSetting.ParkConnect);
         foreach (CardEventRecord record in CardEvents)
         {
             List <SnapShot> shots = ssb.GetSnapShots(record.EventDateTime, record.CardID);
             if (shots != null && shots.Count > 0)
             {
                 for (int i = 0; i < shots.Count; i++)
                 {
                     string f = string.Format("{0}_{1}_{2}.jpg", record.EntranceName, record.EventDateTime.ToString("yyyyMMddHHmmss"), shots[i].VideoSourceID.ToString("D2"));
                     shots[i].Image.Save(System.IO.Path.Combine(ExportFolder, f));
                 }
             }
             Action action = delegate()
             {
                 this.progressBar1.Value++;
                 this.label1.Text = string.Format(Resources.Resource1.FrmSnapshotExport_Processing, progressBar1.Value, progressBar1.Maximum);
                 if (this.progressBar1.Value == this.progressBar1.Maximum)
                 {
                     this.Close();
                 }
             };
             if (this.InvokeRequired)
             {
                 this.Invoke(action);
             }
             else
             {
                 action();
             }
         }
     }
     catch (ThreadAbortException)
     {
     }
 }
Esempio n. 7
0
        private void ShowDetail(string cardID, string enterCarPlate, string exitCarPlate, DateTime?enterDateTime, DateTime?exitDateTime)
        {
            this.txtCardID.Text        = cardID;
            this.lblEnterCarPlate.Text = enterCarPlate;
            this.lblExitCarPlate.Text  = exitCarPlate;
            this.lblEnterDateTime.Text = string.Empty;
            this.lblExitDateTime.Text  = string.Empty;

            if (enterDateTime != null)
            {
                this.lblEnterDateTime.Text = enterDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            }
            if (exitDateTime != null)
            {
                this.lblExitDateTime.Text = exitDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            }
            SnapShotBll ssbll = new SnapShotBll(AppSettings.CurrentSetting.ImageDBConnStr);

            this.picIn.Clear();
            if (enterDateTime != null)
            {
                List <SnapShot> imgs = ssbll.GetSnapShots(enterDateTime.Value, cardID);
                if (imgs != null && imgs.Count > 0)
                {
                    this.picIn.ShowSnapShots(imgs);
                }
            }

            this.picOut.Clear();
            if (exitDateTime != null)
            {
                List <SnapShot> outImgs = ssbll.GetSnapShots(exitDateTime.Value, cardID);
                if (outImgs != null && outImgs.Count > 0)
                {
                    this.picOut.ShowSnapShots(outImgs);
                }
            }
        }
Esempio n. 8
0
        //end
        #endregion

        #region 私有方法
        private void ShowCardPaymentInfo(CardPaymentInfo cardPayment)
        {
            this.txtCardID.Text = cardPayment.CardID;
            this.txtCardID.SelectAll();
            this.lblOwnerName.Text     = cardPayment.OwnerName;
            this.lblCarNum.Text        = cardPayment.CarPlate;
            this.lblEnterDateTime.Text = cardPayment.EnterDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblExitDateTime.Text  = cardPayment.ChargeDateTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.lblParkingTime.Text   = cardPayment.TimeInterval;
            this.lblCardType.Text      = cardPayment.CardType.ToString();
            this.lblTariffType.Text    = Ralid.Park.BusinessModel.Resouce.TariffTypeDescription.GetDescription(cardPayment.TariffType);
            //this.lblLastTotalPaid.Text = cardPayment.LastTotalPaid.ToString();
            this.lblLastTotalPaid.Text = _cardInfo.TotalPaidFee.ToString();
            //this.lblLastTotalDiscount.Text = cardPayment.LastTotalDiscount.ToString();
            this.lblAccounts.Text        = cardPayment.Accounts.ToString();
            this.lblLastWorkstation.Text = cardPayment.LastStationID;
            this.txtPaid.DecimalValue    = cardPayment.Accounts - cardPayment.Discount;
            this.lblDiscount.Text        = cardPayment.Discount.ToString();
            this.txtMemo.Text            = string.Empty;

            this.picIn.Clear();
            SnapShotBll     _SnapShotBll = new SnapShotBll(AppSettings.CurrentSetting.ParkConnect);
            List <SnapShot> imgs         = _SnapShotBll.GetSnapShots(cardPayment.EnterDateTime.Value, cardPayment.CardID);

            if (imgs != null && imgs.Count > 0)
            {
                this.picIn.ShowSnapShots(imgs);
            }

            string msg = string.Format(Resource1.FrmCardPaying_PayingSpeech, TariffSetting.Current.TariffOption.StrMoney(cardPayment.Accounts));

            this.carTypePanel1.SelectedCarType = cardPayment.CarType;
            this.btnCash.Enabled = true;
            this.btnCash.Focus();
            if (cardPayment.CardType.Name.Contains("中山通") &&
                AppSettings.CurrentSetting.EnableZST && !string.IsNullOrEmpty(AppSettings.CurrentSetting.ZSTReaderIP))
            {
                this.btnYCT.Text    = "中山通[&F10]";
                this.btnYCT.Enabled = true;
            }
            else
            {
                this.btnYCT.Enabled = (_YCTReader != null) ? true : false;
            }
            this.btnCancel.Enabled = true;
            this.btnRepay.Enabled  = _cardInfo.IsPaid;

            if (_cardInfo.IsCompletedPaid && TariffSetting.Current.IsInFreeTime(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime))
            {
                //已缴费,并且未过免费时间
                msg = string.Format(Resource1.FrmCardCenterCharge_FreeRemain, TariffSetting.Current.FreeTimeRemaining(_cardInfo.PaidDateTime.Value, cardPayment.ChargeDateTime));
                this.eventList.InsertMessage(msg);
                this.txtMemo.Text = msg;
                //不允许缴费
                this.btnCash.Enabled = false;
                this.btnYCT.Enabled  = false;
            }

            if (_ChargeLed != null)
            {
                _ChargeLed.DisplayMsg(msg);
            }
            if (AppSettings.CurrentSetting.EnableTTS)
            {
                TTSSpeech.Instance.Speek(msg);
            }

            //长隆转会员卡功能
            if (cardPayment.CardID == _TempCardID && CarTypeSetting.Current.GetDescription(cardPayment.CarType) == _ToVipCard)
            {
                this.txtMemo.Text = _ToVipCard + _VipCardID;
            }

            CardReaderManager.GetInstance(UserSetting.Current.WegenType).StopReadCard();
        }