Exemplo n.º 1
0
        public async Task <IActionResult> PutTcontroller(short id, Tcontroller tcontroller)
        {
            if (id != tcontroller.TcontrollerId)
            {
                return(BadRequest());
            }

            _context.Entry(tcontroller).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TcontrollerExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemplo n.º 2
0
        private async void PopulateTodayQuotes()
        {
            ShowLoadingQuotesIndicator();

            await Tcontroller.LoadData();

            BindCollectionToTodayView();

            if (!Tcontroller.IsDataLoaded())
            {
                ShowTodayNoContentViews();
                return;
            }

            PopulateHeroQuote();

            HideLoadingQuotesIndicator();
        }
Exemplo n.º 3
0
        private void BindCollectionToTodayView()
        {
            ListView   todayList          = Controller.FindChildControl <ListView>(RecentSection, "ListQuotes") as ListView;
            StackPanel NoContentTodayView = Controller.FindChildControl <StackPanel>(RecentSection, "NoContentTodayView") as StackPanel;

            if (Tcontroller.IsDataLoaded())
            {
                todayList.ItemsSource         = TodayController.TodayCollection;
                todayList.Visibility          = Visibility.Visible;
                NoContentTodayView.Visibility = Visibility.Collapsed;

                //Controller.UpdateTile(TodayController.TodayCollection[0]);
            }
            else
            {
                todayList.Visibility          = Visibility.Collapsed;
                NoContentTodayView.Visibility = Visibility.Visible;
            }
        }
Exemplo n.º 4
0
        public async Task <ActionResult <Tcontroller> > PostTcontroller(Tcontroller tcontroller)
        {
            _context.Tcontroller.Add(tcontroller);
            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (TcontrollerExists(tcontroller.TcontrollerId))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtAction("GetTcontroller", new { id = tcontroller.TcontrollerId }, tcontroller));
        }
Exemplo n.º 5
0
 public ParseController(IEnumerable <Tsource> source, Tcontroller controller)
 {
     sr = new SequenceReader <Tsource>(source);
     this.controller = controller;
 }