示例#1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         Dependecy = null;
         NotifyTable?.Stop();
         NotifyTable = null;
     }
 }
示例#2
0
        void reloadNotifications(string inProgID, string inProgType)
        {
            NotificationRepository notificationRep = new NotificationRepository(AppDelegate.DatabaseContext);
            List <NotificationDO>  notificationDOs = notificationRep.GetEntities().ToList();

            if (notificationDOs != null && notificationDOs.Count > 0)
            {
                notificationDOs = notificationDOs.OrderByDescending(i => i.ID).ToList();
            }
            DateTime today = DateTime.Today;
            List <NotificationDO> prevNotifications = new List <NotificationDO>();

            prevNotifications = notificationDOs.Where(n => n.NotificationDate < today) != null?notificationDOs.Where(n => n.NotificationDate < today).ToList() : prevNotifications;

            foreach (var prevNotification in prevNotifications)
            {
                notificationRep.DeleteEntity(prevNotification.ID);
                notificationDOs.Remove(prevNotification);
            }
            List <Model.Notifications> notifications = Converter.GetNotificationList(notificationDOs);

            if (inProgID != "COMPLETE")
            {
                Model.Notifications inProgressNotification = notifications.Find(n => n.notificationType == inProgType && n.notificationTypeID == inProgID);
                if (inProgressNotification != null)
                {
                    inProgressNotification.inProgress = true;
                    //AppDelegate.dataSync.notifiy-=  notificationChange;
                }
            }

            notifySource2 nsrc = new notifySource2(notifications);

            NotifyTable.Source          = nsrc;
            NotifyTable.RowHeight       = 100.0f;
            NotifyTable.TableFooterView = new UIView(new CoreGraphics.CGRect(0, 0, 0, 0));
            NotifyTable.ReloadData();
        }
示例#3
0
 void StartServiceTableDependecy(string conectionString, List <SystimeDataAcces.NotificationEntity.Enums.NotificationSqlTypes> eventSuport)
 {
     NotifyTable = NotifyTable.GetInstance();
     NotifyTable.Start(TableEvnet, conectionString, eventSuport, this);
 }