Example #1
0
 private void RetourneInfoCompteur(CsClient leClient)
 {
     try
     {
         Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         client.ChargerDetailClientCompleted += (ss, 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;
             }
             LayoutRoot.Cursor = Cursors.Arrow;
         };
         client.ChargerDetailClientAsync(leClient);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
        private void ChargeDetailDEvis(CsClient leclient)
        {
            try
            {
                prgBar.Visibility = System.Windows.Visibility.Visible;

                leclient.TYPEDEMANDE = Tdem;
                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                client.ChargerDetailClientAsync(leclient);
                client.ChargerDetailClientCompleted += (ssender, args) =>
                {
                    prgBar.Visibility = System.Windows.Visibility.Collapsed;

                    if (args.Cancelled || args.Error != null)
                    {
                        string error = args.Error.Message;
                        Message.ShowError(error, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    if (args.Result == null)
                    {
                        Message.ShowError(Silverlight.Resources.Devis.Languages.AucunesDonneesTrouvees, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    else
                    {
                        laDetailDemande = new CsDemande();
                        laDetailDemande = args.Result;
                        if (laDetailDemande.Abonne != null && laDetailDemande.Abonne.DRES == null)
                        {
                            this.txtSite.Text   = string.IsNullOrEmpty(laDetailDemande.LeClient.LIBELLESITE) ? string.Empty : laDetailDemande.LeClient.LIBELLESITE;
                            this.txtCentre.Text = string.IsNullOrEmpty(laDetailDemande.LeClient.LIBELLECENTRE) ? string.Empty : laDetailDemande.LeClient.LIBELLECENTRE;
                            this.txtCentre.Tag  = laDetailDemande.Abonne.FK_IDCENTRE;
                            this.txt_tdem.Text  = SessionObject.LstTypeDemande.FirstOrDefault(t => t.CODE == Tdem).LIBELLE;
                            txt_tdem.Tag        = SessionObject.LstTypeDemande.FirstOrDefault(t => t.CODE == Tdem);
                            AfficherInfoAdresse(laDetailDemande.Ag);
                            AfficherDocumentScanne(laDetailDemande.ObjetScanne);
                        }
                        else
                        {
                            Message.ShowInformation("Ce abonné est résilié", "Info");
                            return;
                        }
                    }
                };
            }
            catch (Exception ex)
            {
                prgBar.Visibility = System.Windows.Visibility.Collapsed;
                Message.ShowError("Erreur au chargement des donnéés", "Demande");
            }
        }
Example #3
0
 private void RetourneInfoCompteurduClient(CsClient leClient)
 {
     try
     {
         prgBar.Visibility = System.Windows.Visibility.Visible;
         Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         client.ChargerDetailClientCompleted += (ssender, args) =>
         {
             prgBar.Visibility = System.Windows.Visibility.Collapsed;
             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
             {
                 laDDe = args.Result;
                 this.Txt_CodeCentre.Text     = string.IsNullOrEmpty(laDetailDemande.LaDemande.CENTRE) ? string.Empty : laDetailDemande.LaDemande.CENTRE;
                 this.Txt_LibelleCentre.Text  = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLECENTRE) ? string.Empty : laDetailDemande.LaDemande.LIBELLECENTRE;
                 this.Txt_CodeProduit.Text    = string.IsNullOrEmpty(laDetailDemande.LaDemande.PRODUIT) ? string.Empty : laDetailDemande.LaDemande.PRODUIT;
                 this.Txt_LibelleProduit.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLEPRODUIT) ? string.Empty : laDetailDemande.LaDemande.LIBELLEPRODUIT;
                 this.Txt_NumDemande.Text     = string.IsNullOrEmpty(laDetailDemande.LaDemande.NUMDEM) ? string.Empty : laDetailDemande.LaDemande.NUMDEM;
                 this.Txt_Client.Text         = string.IsNullOrEmpty(laDetailDemande.LaDemande.CLIENT) ? string.Empty : laDetailDemande.LaDemande.CLIENT;
                 if (laDetailDemande.LstCanalistion != null && laDetailDemande.LstCanalistion.Count != 0 &&
                     laDDe.LstCanalistion != null && laDDe.LstCanalistion.Count != 0)
                 {
                     if (laDDe.LstCanalistion.First().PRODUIT == SessionObject.Enumere.ElectriciteMT)
                     {
                         this.Txt_LibelleDiametre.IsEnabled = false;
                         laDDe.LstCanalistion.First().NUMERO = laDDe.LstCanalistion.First().NUMERO.Substring(5, (laDDe.LstCanalistion.First().NUMERO.Length - 5));
                     }
                     AfficherCannalisation(laDetailDemande.LstCanalistion.First(), laDDe.LstCanalistion.First());
                     AfficherDocumentScanne(laDetailDemande.ObjetScanne);
                 }
                 Txt_Motif.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.MOTIF) ? string.Empty : laDetailDemande.LaDemande.MOTIF;
             }
         };
         client.ChargerDetailClientAsync(leClient);
     }
     catch (Exception)
     {
         throw;
     }
 }
        private void RetourneAbonClient(CsClient leClient)
        {
            try
            {
                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                client.ChargerDetailClientCompleted += (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
                    {
                        laDDe = args.Result;
                    }
                    if (laDDe.Abonne.PRODUIT == SessionObject.Enumere.ElectriciteMT)
                    {
                        this.Txt_NouvTypeComptage.Visibility = System.Windows.Visibility.Visible;
                        this.Txt_TypeComptage.Visibility     = System.Windows.Visibility.Visible;

                        lbl_TypeComptage.Visibility     = System.Windows.Visibility.Visible;
                        lbl_NouvTypeComptage.Visibility = System.Windows.Visibility.Visible;
                    }

                    if (laDDe.Abonne.PRODUIT == SessionObject.Enumere.Eau)
                    {
                        this.chk_EstBornePoste.Visibility    = System.Windows.Visibility.Collapsed;
                        this.chk_EstBornePosteNew.Visibility = System.Windows.Visibility.Collapsed;
                    }


                    AfficherInfoAbonnement(laDetailDemande, laDDe);
                    AfficherDocumentScanne(laDetailDemande.ObjetScanne);
                };
                client.ChargerDetailClientAsync(leClient);
            }
            catch (Exception)
            {
                throw;
            }
        }
        private void RetourneInfoAdresseduClient(CsClient leClient)
        {
            try
            {
                prgBar.Visibility = System.Windows.Visibility.Visible;

                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                client.ChargerDetailClientCompleted += (ssender, args) =>
                {
                    prgBar.Visibility = System.Windows.Visibility.Collapsed;

                    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
                    {
                        laDDe = args.Result;
                    }
                    AfficherInfoClient(laDetailDemande, laDDe);
                    AfficherDocumentScanne(laDetailDemande.ObjetScanne);
                    this.Txt_Motif.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.MOTIF) ? string.Empty : laDetailDemande.LaDemande.MOTIF;
                };
                client.ChargerDetailClientAsync(leClient);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #6
0
        private void ChargeDetailDEvis(CsClient leclient)
        {
            try
            {
                leclient.TYPEDEMANDE = Tdem;
                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                client.ChargerDetailClientCompleted += (ssender, args) =>
                {
                    prgBar.Visibility = System.Windows.Visibility.Collapsed;

                    if (args.Cancelled || args.Error != null)
                    {
                        string error = args.Error.Message;
                        Message.ShowError(error, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    if (args.Result == null)
                    {
                        Message.ShowError(Silverlight.Resources.Devis.Languages.AucunesDonneesTrouvees, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    else
                    {
                        laDetailDemande = new CsDemande();
                        laDetailDemande = args.Result;
                        if (laDetailDemande.Abonne != null && laDetailDemande.Abonne.DRES == null)
                        {
                            this.txtSite.Text     = string.IsNullOrEmpty(laDetailDemande.LeClient.LIBELLESITE) ? string.Empty : laDetailDemande.LeClient.LIBELLESITE;
                            this.txtCentre.Text   = string.IsNullOrEmpty(laDetailDemande.LeClient.LIBELLECENTRE) ? string.Empty : laDetailDemande.LeClient.LIBELLECENTRE;
                            this.txt_Produit.Text = string.IsNullOrEmpty(laDetailDemande.Abonne.LIBELLEPRODUIT) ? string.Empty : laDetailDemande.Abonne.LIBELLEPRODUIT;
                            this.txt_Produit.Tag  = laDetailDemande.Abonne.FK_IDPRODUIT;
                            this.txtCentre.Tag    = laDetailDemande.Abonne.FK_IDCENTRE;
                            CodeProduit           = laDetailDemande.Abonne.PRODUIT;
                            this.txt_tdem.Text    = SessionObject.LstTypeDemande.FirstOrDefault(t => t.CODE == Tdem).LIBELLE;
                            txt_tdem.Tag          = SessionObject.LstTypeDemande.FirstOrDefault(t => t.CODE == Tdem);

                            if (laDetailDemande.LstCanalistion != null && laDetailDemande.LstCanalistion.Count != 0)
                            {
                                if (laDetailDemande.Abonne.PRODUIT == SessionObject.Enumere.ElectriciteMT)
                                {
                                    this.btn_DiametreCompteur.IsEnabled = false;
                                    this.Txt_LibelleDiametre.IsEnabled  = false;
                                    laDetailDemande.LstCanalistion.First().NUMERO = laDetailDemande.LstCanalistion.First().NUMERO.Substring(5, (laDetailDemande.LstCanalistion.First().NUMERO.Length - 5));
                                }
                                AfficherCannalisationDemande(laDetailDemande.LstCanalistion.First());
                                AfficherDocumentScanne(laDetailDemande.ObjetScanne);
                            }
                        }
                        else
                        {
                            Message.ShowInformation("Ce abonné est résilié", "Info");
                            return;
                        }
                    }
                };
                client.ChargerDetailClientAsync(leclient);
            }
            catch (Exception ex)
            {
                prgBar.Visibility = System.Windows.Visibility.Collapsed;
                Message.ShowError("Erreur au chargement des donnéés", "Demande");
            }
        }