private void LookDocTechnique_Click(object sender, RoutedEventArgs e) { if (this._comboBoxTypeCommande.SelectedItem != null) { ParametreTypeCommandeControl parametreTypeCommandeControl = new ParametreTypeCommandeControl(); if (this._comboBoxAffaire.SelectedItem != null) { if (((Affaire)this._comboBoxAffaire.SelectedItem).Affaire_Type_Commande.Where(aff => aff.Type_Commande1.Identifiant == ((Type_Commande)this._comboBoxTypeCommande.SelectedItem).Identifiant).Count() != 0) { Affaire_Type_Commande toWatch = ((Affaire)this._comboBoxAffaire.SelectedItem).Affaire_Type_Commande.Where(aff => aff.Type_Commande1.Identifiant == ((Type_Commande)this._comboBoxTypeCommande.SelectedItem).Identifiant).First(); TypeDocTechniqueWindow typedocTechniqueWindow = new TypeDocTechniqueWindow(); if (toWatch != null) { typedocTechniqueWindow.DataContext = toWatch; } else { typedocTechniqueWindow.DataContext = (Type_Commande)this._comboBoxTypeCommande.SelectedItem; } typedocTechniqueWindow.LectureSeule(); bool? dialogResult = typedocTechniqueWindow.ShowDialog(); } else { parametreTypeCommandeControl.Look((Type_Commande)this._comboBoxTypeCommande.SelectedItem); } } else { parametreTypeCommandeControl.Look((Type_Commande)this._comboBoxTypeCommande.SelectedItem); } } }
private void _CommandAfficherTypeCommande_Executed(object sender, ExecutedRoutedEventArgs e) { this._mutex.WaitOne(); this.startThread(); this.progressBarMainWindow.IsIndeterminate = true; this.textBlockMainWindow.Text = "Chargement des types de commande en cours ..."; ((App)App.Current).refreshEDMX(); ParametreTypeCommandeControl parametreTypeCommandeControl = new ParametreTypeCommandeControl(); this._BorderContent.Child = parametreTypeCommandeControl; //Mise en couleur de l'icone pour plus de clarté (remise à zéro de toutes les icones + mise en couleur) this.resetCouleurs(); this.TypeCommande.Background = ((App)App.Current).SaveFocusedBackground; this.TypeCommande.BorderBrush = ((App)App.Current).SaveFocusedBorderBrush; }