예제 #1
0
        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));
        }
예제 #2
0
        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());
        }
예제 #3
0
        public ActionResult <List <Record> > GetAll(string campaign_id)
        {
            var list = _recordService.GetAll(campaign_id);

            return(list);
        }
예제 #4
0
 public IEnumerable <Table> Get()
 {
     return(recordService.GetAll());
 }