using Comal.Classes; using Comal.Stores; using InABox.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PRSStores { public class NotificationStore : BaseStore { protected override void AfterSave(Notification entity) { base.AfterSave(entity); if(entity.Closed == DateTime.MinValue) { var userID = Provider.Query( new Filter(x => x.ID).IsEqualTo(entity.Employee.ID), new Columns(x => x.UserLink.ID)).Rows.FirstOrDefault()?.Get(x => x.UserLink.ID); if (userID.HasValue) { PushManager.PushUser(userID.Value, entity); } } } } }