コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Fred128e/Flexcel
 private void BtnStartSelection_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         mainWindowViewModel.InitializeSelection();
         ListContainer listContainer      = ListContainer.Instance;
         List <Offer>  outputListByUserID = listContainer.outputList.OrderBy(x => x.UserID).ToList();
         listView.ItemsSource = outputListByUserID;
         foreach (Offer offer in listContainer.outputList)
         {
             offer.Contractor.CountNumberOfWonOffersOfEachType(listContainer.outputList);
         }
         MessageBox.Show("Udvælgelsen er nu færdig");
     }
     catch (Exception x)
     {
         PromptWindow promptWindow = new PromptWindow(x.Message);
         promptWindow.Show();
     }
 }
コード例 #2
0
 private void ExecuteStartSelection() //gæti verið að þetta virki ekki...þarf að prufa þetta
 {
     try
     {
         InitializeSelection();
         Container  = ListContainer.GetInstance;
         Results    = Container.outputList.OrderBy(x => x.UserID).ToList();
         OutputList = new ObservableCollection <Offer>();
         if (Results != null)
         {
             foreach (var item in Results)
             {
                 OutputList.Add(item);
             }
         }
         MessageBox.Show("Udvælgelsen er nu færdig");
     }
     catch (Exception x)
     {
         PromptWindow promptWindow = new PromptWindow(x.Message);
         promptWindow.Show();
     }
 }