コード例 #1
0
 private void ChargeDetailDEvis(int IdDemandeDevis)
 {
     Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
     client.ChargerDetailDemandeAsync(IdDemandeDevis, string.Empty);
     client.ChargerDetailDemandeCompleted += (ssender, args) =>
     {
         if (args.Cancelled || args.Error != null)
         {
             LayoutRoot.Cursor = Cursors.Arrow;
             string error = args.Error.Message;
             Message.ShowError(error, Silverlight.Resources.Devis.Languages.txtDevis);
             return;
         }
         if (args.Result == null)
         {
             LayoutRoot.Cursor = Cursors.Arrow;
             Message.ShowError(Silverlight.Resources.Devis.Languages.AucunesDonneesTrouvees, Silverlight.Resources.Devis.Languages.txtDevis);
             return;
         }
         else
         {
             laDetailDemande = args.Result;
             this.dtg_EtatCaisse.ItemsSource = null;
             this.dtg_EtatCaisse.ItemsSource = laDetailDemande.LstEltTimbre;
             this.Txt_NumDemande.Text        = laDetailDemande.LaDemande.NUMDEM;
             this.Txt_UserCreat.Text         = laDetailDemande.LaDemande.USERCREATION;
             if (laDetailDemande.ObjetScanne != null && laDetailDemande.ObjetScanne.Count != 0)
             {
                 //dgListePiece.ItemsSource = this.LstPiece;
                 dgListePiece.ItemsSource = laDetailDemande.ObjetScanne;
             }
         }
         LayoutRoot.Cursor = Cursors.Arrow;
     };
 }