Exemple #1
0
        private void AjouterEquivalentTD_Tapped(object sender, TappedRoutedEventArgs e)
        {
            EquivalentTD nouveauEquivalentTD = new EquivalentTD {
                Categorie = enseignantSelectionne.Categorie, TypeCours = null, Ratio = 1, tCs = tCs, Nom = ""
            };

            equivalentTD.create(nouveauEquivalentTD);
            equivalentTDs.Add(nouveauEquivalentTD);
        }
        private ObservableCollectionExt <EquivalentTD> GetEquivalentTDs(Categorie categorieSelectionnee)
        {
            ObservableCollectionExt <EquivalentTD> equivalentTDs = new ObservableCollectionExt <EquivalentTD>();

            foreach (EquivalentTD eqTD in equivalentTD.findAll())

            {
                if (eqTD.Categorie.Id == categorieSelectionnee.Id)
                {
                    EquivalentTD equivalent = new EquivalentTD {
                        Id = eqTD.Id, Categorie = categorieSelectionnee, TypeCours = eqTD.TypeCours, tCs = tCs, Nom = "", Ratio = eqTD.Ratio
                    };
                    equivalentTDs.Add(equivalent);
                }
            }
            return(equivalentTDs);
        }
Exemple #3
0
        private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DataGrid dataGrid = sender as DataGrid;

            equivalentTDSelectionne = (EquivalentTD)dataGrid.SelectedItem;
        }