private void SupprimerVille(object sender, RoutedEventArgs e)
        {
            Villes selection = (Villes)lvVilles.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer la ville {selection.Nom} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { BDD.SupprimerVille(selection); }, nameof(SupprimerVille));
                }
            }
        }
        private void SupprimerBienImmobilier(object sender, RoutedEventArgs e)
        {
            BienImmobiliers selection = (BienImmobiliers)lvBienImmobiliers.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer le bien immobilier {selection.RueNumero} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { BDD.SupprimerBienImmobilier(selection); }, nameof(SupprimerBienImmobilier));
                }
            }
        }
        private void SupprimerClient(object sender, RoutedEventArgs e)
        {
            Clients selection = (Clients)lvClients.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer le client {selection.NomComplet} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { BDD.SupprimerClient(selection); }, nameof(SupprimerClient));
                }
            }
        }
Exemple #4
0
        private void SupprimerType(object sender, RoutedEventArgs e)
        {
            Types selection = (Types)lvTypes.SelectedItem;

            if (selection != null)
            {
                if (MessageBox.Show($"Etes-vous sur de vouloir supprimer le type de bien {selection.Designation} de la liste ?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    Statics.TryCatch(() => { BDD.SupprimerType(selection); }, nameof(SupprimerType));
                }
            }
        }
 private void AjouterBienImmobilier(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvBienImmobiliers.SelectedItem = BDD.AjouterBienImmobilier(DateTime.Now, BDD.Villes.FirstOrDefault(), ""); }, nameof(AjouterBienImmobilier));
 }
 private void AjouterClient(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvClients.SelectedItem = BDD.AjouterClient("Nouveau", "Client", BDD.Villes.FirstOrDefault(), "", "0032"); }, nameof(AjouterClient));
 }
 private void AjouterVille(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvVilles.SelectedItem = BDD.AjouterVille("Nouvelle Ville", "CP"); }, nameof(AjouterVille));
 }
Exemple #8
0
 private void AjouterProprietaire(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvProprietaires.SelectedItem = BDD.AjouterProprietaire("Nouveau", "Proprietaire", BDD.Villes.FirstOrDefault(), "", "0032"); }, nameof(AjouterProprietaire));
 }
Exemple #9
0
 private void AjouterType(object sender, RoutedEventArgs e)
 {
     Statics.TryCatch(() => { lvTypes.SelectedItem = BDD.AjouterType("Nouveau"); }, nameof(AjouterType));
 }