private void ValiderInitialisation(CsDemande demandedevis, bool IsTransmetre) { try { // Get Devis informations from screen if (demandedevis != null) { demandedevis = GetDemandeDevisFromScreen(demandedevis, false); } else { demandedevis = GetDemandeDevisFromScreen(null, false); } // Get DemandeDevis informations from screen if (demandedevis != null) { if (IsTransmetre) { demandedevis.LaDemande.ETAPEDEMANDE = null; } demandedevis.LaDemande.MATRICULE = UserConnecte.matricule; demandedevis.LaDemande.CENTRE = SessionObject.LePosteCourant.CODECENTRE; demandedevis.LaDemande.FK_IDCENTRE = SessionObject.LePosteCourant.FK_IDCENTRE.Value; Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); client.ValiderAchatimbreDemandeCompleted += (ss, b) => { if (b.Cancelled || b.Error != null) { string error = b.Error.Message; Message.ShowError(error, Silverlight.Resources.Devis.Languages.txtDevis); return; } Message.ShowInformation("Demande transmise avec succès", "Achat de timbre"); this.DialogResult = false; }; client.ValiderAchatimbreDemandeAsync(demandedevis); } } catch (Exception ex) { Message.ShowError("Une erreur est survenue a la validation de la demande", "ValiderDemandeInitailisation"); } }