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()); }
private async void PopulateTodayQuotes() { ShowLoadingQuotesIndicator(); await Tcontroller.LoadData(); BindCollectionToTodayView(); if (!Tcontroller.IsDataLoaded()) { ShowTodayNoContentViews(); return; } PopulateHeroQuote(); HideLoadingQuotesIndicator(); }
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; } }
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)); }
public ParseController(IEnumerable <Tsource> source, Tcontroller controller) { sr = new SequenceReader <Tsource>(source); this.controller = controller; }