private void ModifierButton_Click(object sender, RoutedEventArgs e)
 {
     if (null != dtgrdEtape.SelectedItem && 1 == dtgrdEtape.SelectedItems.Count)
     {
         ObjETAPEWKF etape = dtgrdEtape.SelectedItem as ObjETAPEWKF;
         if (null != etape)
         {
             UcWKFEtape ucForm = new UcWKFEtape(etape.LEtape, SessionObject.ExecMode.Modification, Guid.Parse(cmbSousOperation.SelectedValue.ToString()));
             ucForm.Closing += ucForm_Closing;
             ucForm.Show();
         }
     }
 }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (null != cmbSousOperation.SelectedValue)
            {
                //chargement des étapes
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                int back = LoadingManager.BeginLoading("Chargement des étapes");
                client.SelectAllEtapesByOperationIdCompleted += (esender, args) =>
                {
                    LoadingManager.EndLoading(back);
                    if (args.Cancelled || args.Error != null)
                    {
                        string error = args.Error.Message;
                        Message.Show(error, Languages.ListeCodePoste);
                        return;
                    }
                    if (args.Result == null)
                    {
                        Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                        return;
                    }

                    donnesDatagrid = new ObservableCollection <CsEtape>();
                    _LesEtapes     = new ObservableCollection <ObjETAPEWKF>();
                    foreach (CsEtape etape in args.Result.OrderBy(t => t.NOM).ToList())
                    {
                        donnesDatagrid.Add(etape);
                        ObjETAPEWKF o = new ObjETAPEWKF()
                        {
                            LEtape = etape
                        };
                        var leForm = _LesFormulaires.Where(f => f.PK_ID == etape.FK_IDFORMULAIRE).FirstOrDefault();
                        o.FormulaireAssocie = (null != leForm) ? leForm.FORMULAIRE1 : string.Empty;
                        _LesEtapes.Add(o);
                    }

                    dtgrdEtape.ItemsSource = _LesEtapes.OrderBy(t => t.LEtape.CODE);
                };
                client.SelectAllEtapesByOperationIdAsync(Guid.Parse(cmbSousOperation.SelectedValue.ToString()));
            }
            else
            {
                Message.ShowError(new Exception("Veuillez selectionner une opération"), "Liste des étapes d'une opération");
            }
        }