diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientNotifyEvent.cs b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientNotifyEvent.cs index ce6fc66..f3f93bf 100644 --- a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientNotifyEvent.cs +++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/ClientNotifyEvent.cs @@ -662,6 +662,19 @@ namespace GZTW.AyaNova.BLL /// protected override void DataPortal_Update() { + //-------------------------- + //case 3827 + //Remove any entries deliverafter older than 7 days + DBCommandWrapper cmTrim = DBUtil.GetCommandFromSQL( + "DELETE FROM aClientNotifyEvent " + + "WHERE (aDeliverAfter < @SEVENDAYSAGO)" + ); + cmTrim.AddInParameter("@SEVENDAYSAGO", DbType.DateTime, DBUtil.ToUTC(DBUtil.CurrentWorkingDateTime.AddDays(-7))); + + DBUtil.DB.ExecuteNonQuery(cmTrim); + + //------------------------ + // If not a new record, check if record was modified //by another user since original retrieval: if (!IsNew)