private void lstTraders_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lstTraders.SelectedItem != null) { lstActions.ItemsSource = gstBdd.getAllActionsByTrader((lstTraders.SelectedItem as Trader).NumTrader); lstActionsNonPossedees.ItemsSource = gstBdd.getAllActionsNonPossedees((lstTraders.SelectedItem as Trader).NumTrader); txtTotalPortefeuille.Text = gstBdd.getTotalPortefeuille((lstTraders.SelectedItem as Trader).NumTrader).ToString(); } }
private void lstTraders_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lstTraders.SelectedItem != null) { //List<ActionPerso> lesActionsPerso = unGstBdd.getAllActionsByTrader((lstTraders.SelectedItem as Trader).NumTrader); //lstActions.ItemsSource = lesActionsPerso; //double totalPrixActions = 0; //lesActionsPerso.ForEach(uneActionsPerso => //{ // totalPrixActions += uneActionsPerso.Total; //}); lstActions.ItemsSource = unGstBdd.getAllActionsByTrader((lstTraders.SelectedItem as Trader).NumTrader); txtTotalPortefeuille.Text = unGstBdd.getTotalPortefeuille((lstTraders.SelectedItem as Trader).NumTrader).ToString(); lstActionsNonPossedees.ItemsSource = unGstBdd.getAllActionsNonPossedees((lstTraders.SelectedItem as Trader).NumTrader); } }