示例#1
0
        public bool SaveAlert(AlertDetails alertDetails)
        {
            DatabaseAlert dbAlert = new DatabaseAlert(alertDetails);

            dbAlert.EscapeStringFields();
            if (alertDetails.AlertId != 0)
            {
                return(_dbQueryService.PersistExistingAlert(dbAlert));
            }
            else
            {
                return(_dbQueryService.PersistNewAlert(dbAlert));
            }
        }
示例#2
0
 private void SnoozeAlert(DatabaseAlert alert)
 {
     alert.SnoozedUntil = DateTime.Now.AddMinutes(snoozeDurationMinutes);
     _databaseQueryService.PersistExistingAlert(alert);
 }