Ejemplo n.º 1
0
 public void ProcessReport(ReportBase report)
 {
     try
     {
         if (report is CardEventReport)
         {
             CardEventReport r = report as CardEventReport;
             ReportHandle(r);
         }
         else if (report is ParkVacantReport)
         {
             ParkVacantReport r = report as ParkVacantReport;
             ReportHandle(r);
         }
         else if (report is CarSenseReport)
         {
             CarSenseReport r = report as CarSenseReport;
             //车到、车走时清空刷卡事件信息
             ReportHandle(r);
         }
         else if (report is UpdateSystemParamSettingReport)
         {
             UpdateSystemParamSettingReport r = report as UpdateSystemParamSettingReport;
             ReportHandle(r);
         }
     }
     catch (Exception ex)
     {
         Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
     }
 }
Ejemplo n.º 2
0
        private void ReportHandle(UpdateSystemParamSettingReport report)
        {
            if (report.StationID != WorkStationInfo.CurrentStation.StationID)
            {
                Type type = typeof(VehicleLedSetting);
                if (report.ParamTypeName == type.Name)
                {
                    _VehicleLedSetting = (new SysParaSettingsBll(AppSettings.CurrentSetting.ParkConnect)).GetSetting <VehicleLedSetting>();

                    if (this.Visible)
                    {
                        Action action = delegate()
                        {
                            ShowSetting();
                        };
                        if (this.InvokeRequired)
                        {
                            this.BeginInvoke(action);
                        }
                        else
                        {
                            action();
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public bool UpdateSystemParamSetting(UpdateSystemParamSettingNotity notify)
        {
            UpdateSystemParamSettingReport report = new UpdateSystemParamSettingReport();

            report.EventDateTime = DateTime.Now;
            report.OperatorID    = notify.Operator.OperatorName;
            report.StationID     = notify.StationID;
            report.SourceName    = notify.StationName;
            report.ParamTypeName = notify.ParamTypeName;

            ReportEnqueue(report);

            return(true);
        }
Ejemplo n.º 4
0
        private void ReportSink(UpdateSystemParamSettingReport report)
        {
            List <IReportSinker> faultSinkers = new List <IReportSinker>();

            foreach (IReportSinker reportSinker in _reportSinkers)
            {
                try
                {
                    reportSinker.UpdateSystemParamSettingSink(report);
                }

                catch (Exception ex)
                {
                    faultSinkers.Add(reportSinker);
                    ExceptionPolicy.HandleException(ex);
                }
            }
            if (faultSinkers.Count > 0)
            {
                RemoveSinkers(faultSinkers);
            }
        }