public void dependency_OnChange(object sender, SqlNotificationEventArgs e)
 {
     try
     {
         if (e.Type == SqlNotificationType.Change)
         {
             if (_notificationBL != null)
             {
                 _notificationBL.Notify(new List <BusinessRulesDTO>());
             }
         }
     }
     catch (Exception ex)
     {
         // Use Elmah To Record Exception Here
     }
 }
 public void Dependency_OnChange(object sender, SqlNotificationEventArgs e)
 {
     try
     {
         if (e.Type == SqlNotificationType.Change)
         {
             var changed = GetUpdated(_plateNumber);
             if (_vehicleLiveTrackingBL != null && changed != null && changed.Any())
             {
                 _vehicleLiveTrackingBL.Notify(changed);
                 UpdateChanged(changed);
             }
         }
     }
     catch
     {
     }
 }
 public void dependency_OnChange(object sender, SqlNotificationEventArgs e)
 {
     try
     {
         if (e.Type == SqlNotificationType.Change)
         {
             var changed = GetUpdated();
             if (_patrolLocationsBL != null && changed != null && changed.Any())
             {
                 _patrolLocationsBL.Notify(changed);
                 UpdateChanged(changed);
             }
         }
     }
     catch (Exception ex)
     {
         // Use Elmah To Record Exception Here
     }
 }
Пример #4
0
        public void dependency_OnChange(object sender, SqlNotificationEventArgs e)
        {
            try
            {
                if (e.Type == SqlNotificationType.Change)
                {
                    if (_officerNewsBL != null)
                    {
                        var changed = GetUpdated();

                        _officerNewsBL.Notify(changed);
                        UpdateChanged(changed);
                    }
                }
            }
            catch (Exception ex)
            {
                Utility.WriteLog(ex);
            }
        }
Пример #5
0
 public void dependency_OnChange(object sender, SqlNotificationEventArgs e)
 {
     try
     {
         if (e.Type == SqlNotificationType.Change)
         {
             var changed = GetUpdated();
             changed = changed.Where(x => x.LastStatus > 1).ToList();
             if (_notificationBL != null && changed != null && changed.Any())
             {
                 _notificationBL.Notify(changed);
                 UpdateChanged(changed);
             }
         }
     }
     catch (Exception ex)
     {
         // Use Elmah To Record Exception Here
     }
 }
        public void dependency_OnChange(object sender, SqlNotificationEventArgs e)
        {
            try
            {
                if (e.Type == SqlNotificationType.Change)
                {
                    Task.Delay(1000);
                    var changed = GetUpdated();
                    if (_userControlBL != null && changed != null && changed.Any())
                    {
                        _userControlBL.Notify(changed);

                        UpdateNoticed(changed);
                    }
                }
            }
            catch (Exception ex)
            {
                // Use Elmah To Record Exception Here
            }
        }