示例#1
0
 private void ListFonds_Loaded(object sender, RoutedEventArgs e)
 {
     g463_runnersDataSet.CharityDataTable data = new g463_runnersDataSetTableAdapters.CharityTableAdapter().GetData();
     for (int i = 0; i < data.Count; i++)
     {
         g463_runnersDataSet.CharityRow element = data[i];
         Fond fond = new Fond(element.CharityName, element.CharityDescription, element.CharityLogo);
         stackFonds.Children.Add(fond);
     }
 }
 private void RegisterOnMarathon_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         var founds = new g463_runnersDataSetTableAdapters.CharityTableAdapter().GetDataWithoutLogo();
         foundComboBox.ItemsSource       = founds;
         foundComboBox.DisplayMemberPath = "CharityDescription";
         foundComboBox.SelectedValuePath = "CharityId";
         foundComboBox.SelectedIndex     = 0;
     }
     catch { }
 }