Sunday 15 February 2015

c# - the information is not appearing -


I have created the database and all the coding but the information is now visible in the phone. How can I reveal them? It can not show me any details, it shows me that it can not be coding this line from "this.listBox.ItemsSource = CarScores;"

  // Home Page Coding .xaml.CS Namespace carDatabaseCreater {Public Partial Class MainPage: PhoneApplicationPage {Public Static List & lt; Cars & gt; CarScoresList = New list & lt; Cars & gt; (); Uri Uri; Grid cargrid; CarahispropyRegositoryRespositoryRegository; ObservableCollection & LT; Cars & gt; CarScores; // Constructor Public Manpage () {Initialization (); This.DisplayCarHistory (); This.UpdateCarScoresFromDB (); } Public Zero SaveCarToCarHistory (car _Car) {CarHisrotyRepository _CarHisrotyRepository = New CarHisrotyRepository (); Car item0 = new car () {karname = "Arian", Carsplainer name = "Bahoan", Carmage = "Image / BMW .JPG", Company name = "Toyota"}; Car item 1 = new car () {carmen = "Arian", Carsplainer name = "Bahoan", Carmage = "Image / BMW .JPG", Company name = "Toyota"}; Car item 2 = new car () {karname = "Arian", Carsplainer name = "Bahoan", Carmage = "Image / BMW .jpg", Company name = "Toyota"}; Car item 3 = new car () {kamam = "Arian", Carsplainer name = "Bahoan", Carmage = "Image / BMW .jpg", Company name = "Toyota"}; Car item 4 = new car () {karname = "Arian", Carsplainer name = "Bahoan", Carmage = "Image / BMW .jpg", Company name = "Toyota"}; CarScoresList.Add (item0); _CarHisrotyRepository.Save (item0); CarScoresList.Add (ITEM1); _CarHisrotyRepository.Save (ITEM1); CarScoresList.Add (ITEM2); _CarHisrotyRepository.Save (ITEM2); CarScoresList.Add (ITEM3); _CarHisrotyRepository.Save (ITEM3); CarScoresList.Add (item4); _CarHisrotyRepository.Save (item4); } Private Zero UpdateCarScoresFromDB () {CarHisrotyRepository CarHisrotyRepository = New carDatabaseCreater.CarHisrotyRepository (); & Lt; Cars & gt; AllGames = CarHisrotyRepository.allQuery (CarHisrotyRepository.CarContext) .Oolist (); } Public Zero Investigator History () {this.CarHisrotyRepository = New CarHisrotyRepository (); // Get game history from the IsoStore list & lt; Cars & gt; CarHistory = this.CarHisrotyRepository.Load (); // Display on screen CarScores = new reviewable selection & lt; Cars & gt; (CarHistory); This.listBox.ItemsSource = CarScores; // error appears here}}}    

Do not see where you put the car's grid in the view tree. Perhaps this is the reason?

No comments:

Post a Comment