private Tuple <List <Record>, bool> GetRecordsOrRedirected(Interval interval) { List <Record> records; bool isRedirected = false; if ((int)interval < 2) { bool recordsWereFoundForInterval = TryFindRecords(interval, out records); if (!recordsWereFoundForInterval) { isRedirected = true; } } else { try { records = _recordService.GetAll(); _logger.LogInformation("retrieved the entire list of records from the database"); } catch (Exception e) { records = new List <Record>(); _logger.LogWarning("failed to retrieve the entire list of records from the database: " + e.Message); } } return(Tuple.Create(records, isRedirected)); }
private void Window_Loaded(object sender, RoutedEventArgs e) { RecordService recordService = new RecordService(); records = new RecordCollection(recordService.GetAll()); ProgramService programService = new ProgramService(); programs = new ProgramCollection(programService.GetAll()); dgridTvRecord.ItemsSource = records.collecion; dgridProgram.ItemsSource = programs.collecion; ChannelService channelService = new ChannelService(); channels = new ChannelCollection(channelService.GetAll()); }
public ActionResult <List <Record> > GetAll(string campaign_id) { var list = _recordService.GetAll(campaign_id); return(list); }
public IEnumerable <Table> Get() { return(recordService.GetAll()); }