Ejemplo n.º 1
0
        public void GetRecurrence(ObservableCollection<NotificacionModel> notifs)
        {
            NotificationRepository _NotificationRepository = new NotificationRepository();
            long fechaSystema = long.Parse(String.Format("{0:yyyy:MM:dd:HH:mm:ss:fff}", DateTime.Now).Replace(":", ""));

            if (notifs.Count() !=0)
            {
                notifs.ToList().ForEach(p =>
                {
                    if (this.GetFUMRecurrencia(p) <= fechaSystema)
                    {
                        Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            this.GetParetWindows().GetScreenActive();
                            //actualizar la fecha por la del sistema
                            _NotificationRepository.UpdateNotificationRecurrencia(
                                new Model.NotificacionModel()
                                {
                                    IdNotificacion = p.IdNotificacion,
                                    Recurrencia =p.Recurrencia,
                                    FechaUltimaMuestra = new UNID().getNewUNID()
                                });
                        }));
                    }
                });

            }
        }