protected virtual void Dispose(bool disposing) { if (disposing) { Dependecy = null; NotifyTable?.Stop(); NotifyTable = null; } }
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(); }
void StartServiceTableDependecy(string conectionString, List <SystimeDataAcces.NotificationEntity.Enums.NotificationSqlTypes> eventSuport) { NotifyTable = NotifyTable.GetInstance(); NotifyTable.Start(TableEvnet, conectionString, eventSuport, this); }