private void CheckOnlyCountActivityAndRefreshAlarmManager() { // Refresh AlarmManager Alarm.IsInitFinished = false; var allAlarms = alarmService.GetAllAlarms(); Alarm.IsInitFinished = true; AlarmHelper.RefreshAlarmByManager100(allAlarms); OnlyCountDown(); }
public async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "alarms")] HttpRequest req, ILogger log) { List <AlarmSystem.Core.Entity.DB.Alarm> alarms = _alarmService.GetAllAlarms(); if (alarms.Count == 0) { return(new NoContentResult()); } return(new OkObjectResult(alarms)); }