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)); } }
private void SnoozeAlert(DatabaseAlert alert) { alert.SnoozedUntil = DateTime.Now.AddMinutes(snoozeDurationMinutes); _databaseQueryService.PersistExistingAlert(alert); }