Esempio n. 1
0
 private void btn_Poste_Click(object sender, RoutedEventArgs e)
 {
     this.btn_Poste.IsEnabled = false;
     if (LstDePosteElectrique.Count != 0)
     {
         List <object>    _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstDePosteElectrique);
         UcListeGenerique ctr     = new UcListeGenerique(_LstObj, "CODE", "LIBELLE", Langue.lbl_ListePoste);
         ctr.Closed += new EventHandler(galatee_OkClickedBtnPoste);
         ctr.Show();
     }
 }
        void ChargerTypeCompteur()
        {
            LstTypeCompteur = new List <CsTcompteur>();

            if (SessionObject.LstTypeCompteur.Count != 0)
            {
                if (TypeDemande == SessionObject.Enumere.ModificationCompteur)
                {
                    LstTypeCompteur = SessionObject.LstTypeCompteur;
                }
                else
                {
                    LstTypeCompteur = SessionObject.LstTypeCompteur.Where(p => p.PRODUIT == LaDemande.LaDemande.PRODUIT).ToList();
                }
                if (LstTypeCompteur.Count != 0)
                {
                    if (!string.IsNullOrEmpty(this.Txt_CodeTypeCompteur.Text) &&
                        (string.IsNullOrEmpty(this.Txt_LibelleTypeCompteur.Text)))
                    {
                        CsTcompteur _LeType = ClasseMEthodeGenerique.RetourneObjectFromList(LstTypeCompteur, this.Txt_CodeTypeCompteur.Text, "CODE");
                        if (_LeType != null && !string.IsNullOrEmpty(_LeType.LIBELLE))
                        {
                            this.Txt_LibelleTypeCompteur.Text = _LeType.LIBELLE;
                        }
                    }
                }
            }
            else
            {
                AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
                service.ChargerTypeCompleted += (s, args) =>
                {
                    if (args != null && args.Cancelled)
                    {
                        return;
                    }
                    LstTypeCompteur = args.Result;
                    if (LstTypeCompteur != null && LstTypeCompteur.Count != 0)
                    {
                        if (!string.IsNullOrEmpty(this.Txt_CodeTypeCompteur.Text) &&
                            (string.IsNullOrEmpty(this.Txt_LibelleTypeCompteur.Text)))
                        {
                            CsTcompteur _LeType = ClasseMEthodeGenerique.RetourneObjectFromList(LstTypeCompteur, this.Txt_CodeTypeCompteur.Text, "CODE");
                            if (_LeType != null && !string.IsNullOrEmpty(_LeType.LIBELLE))
                            {
                                this.Txt_LibelleTypeCompteur.Text = _LeType.LIBELLE;
                            }
                        }
                    }
                };
                service.ChargerTypeAsync();
                service.CloseAsync();
            }
        }
Esempio n. 3
0
 private void btn_Site_Click_1(object sender, RoutedEventArgs e)
 {
     if (lstSite.Count > 0)
     {
         this.btn_Site.IsEnabled = false;
         List <object> _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedSite);
         ctr.Show();
     }
 }
 private void btn_Produit_Click(object sender, RoutedEventArgs e)
 {
     if (lProduitSelect != null && lProduitSelect.Count > 0)
     {
         this.btn_Produit.IsEnabled = false;
         List <object>    _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(lProduitSelect);
         UcListeGenerique ctr      = new UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedProduit);
         ctr.Show();
     }
 }
Esempio n. 5
0
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     if (LstCentre.Count > 0)
     {
         this.btn_Centre.IsEnabled = false;
         List <object> _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(LstCentre.Where(t => t.FK_IDCODESITE == (int)this.Txt_CodeSite.Tag).ToList());
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", Galatee.Silverlight.Resources.Accueil.Langue.lbl_ListeCentre);
         ctr.Closed += new EventHandler(galatee_OkClickedCentre);
         ctr.Show();
     }
 }
 private void btn_Marque_Click(object sender, RoutedEventArgs e)
 {
     if (LstMarque.Count != 0)
     {
         this.btn_Marque.IsEnabled = false;
         List <object>    _LstObject = ClasseMEthodeGenerique.RetourneListeObjet(LstMarque);
         UcListeGenerique ctr        = new UcListeGenerique(_LstObject, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedbtn_Marque);
         ctr.Show();
     }
 }
Esempio n. 7
0
 private void btn_Quartier_Click(object sender, RoutedEventArgs e)
 {
     if (this.Txt_CodeCommune.Tag != null && LstQuartierAll.Where(t => t.PK_ID == (int)this.Txt_CodeCommune.Tag).ToList() != null && LstQuartierAll.Where(t => t.PK_ID == (int)this.Txt_CodeCommune.Tag).ToList().Count != 0)
     {
         this.btn_Quartier.IsEnabled = false;
         List <object>    _LstObjQuartier = ClasseMEthodeGenerique.RetourneListeObjet(LstQuartierAll.Where(t => t.PK_ID == (int)this.Txt_CodeCommune.Tag).ToList().OrderByDescending(k => k.COMMUNE).ToList());
         UcListeGenerique ctr             = new UcListeGenerique(_LstObjQuartier, "CODE", "LIBELLE", Langue.lbl_ListeQuartiers);
         ctr.Closed += new EventHandler(galatee_OkClickedBtnQuartier);
         ctr.Show();
     }
 }
        private void ChargerCentre()
        {
            try
            {
                List <int> lstIdCentre = new List <int>();

                if (SessionObject.LstCentre.Count != 0)
                {
                    LstCentre = Shared.ClasseMEthodeGenerique.RetourCentreByPerimetre(SessionObject.LstCentre.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList(), UserConnecte.listeProfilUser);
                    lstSite   = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentre);
                    foreach (Galatee.Silverlight.ServiceAccueil.CsCentre item in LstCentre)
                    {
                        lstIdCentre.Add(item.PK_ID);
                    }
                    return;
                }
                //Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new AccesServiceWCF().GetAcceuilClient();
                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service.ListeDesDonneesDesSiteCompleted += (s, args) =>
                {
                    if (args != null && args.Cancelled)
                    {
                        return;
                    }
                    SessionObject.LstCentre = args.Result;
                    LstCentre = Shared.ClasseMEthodeGenerique.RetourCentreByPerimetre(SessionObject.LstCentre.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList(), UserConnecte.listeProfilUser);
                    lstSite   = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentre);
                    foreach (Galatee.Silverlight.ServiceAccueil.CsCentre item in LstCentre)
                    {
                        lstIdCentre.Add(item.PK_ID);
                    }
                    if (lstSite != null)
                    {
                        List <Galatee.Silverlight.ServiceAccueil.CsSite> _LstSite = lstSite.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList();
                        if (_LstSite.Count == 1)
                        {
                        }
                    }
                    if (LstCentre != null)
                    {
                        List <Galatee.Silverlight.ServiceAccueil.CsCentre> _LstCentre = LstCentre.Where(p => p.CODESITE != SessionObject.Enumere.Generale).ToList();
                        if (_LstCentre.Count == 1)
                        {
                        }
                    }
                };
                service.ListeDesDonneesDesSiteAsync(false);
                service.CloseAsync();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, "LoadCentre");
            }
        }
Esempio n. 9
0
 private void Btn_Rejeter_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ClasseMEthodeGenerique.RejeterDemande(laDetailDemande);
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "");
     }
 }
Esempio n. 10
0
 private void btn_materiel_Click(object sender, RoutedEventArgs e)
 {
     //this.btn_materiel.IsEnabled = false;
     if (LstDeMaterielBrt.Count != 0)
     {
         List <object>    _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstDeMaterielBrt);
         UcListeGenerique ctr     = new UcListeGenerique(_LstObj, "MATERIEL", "LIBELLE", Langue.lbl_ListeMateriel);
         ctr.Closed += new EventHandler(galatee_OkClickedBtnerMateriel);
         ctr.Show();
     }
 }
 private void btn_frequence_Click(object sender, RoutedEventArgs e)
 {
     if (LstFrequence != null && LstFrequence.Count != 0)
     {
         List <object> _ListObj = ClasseMEthodeGenerique.RetourneListeObjet(LstFrequence);
         this.btn_frequence.IsEnabled = false;
         UcListeGenerique ctr = new UcListeGenerique(_ListObj, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedBtnFrequence);
         ctr.Show();
     }
 }
Esempio n. 12
0
 private void Txt_DateDepose_LostFocus(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(Txt_DateDepose.Text))
     {
         if (ClasseMEthodeGenerique.IsDateValide(Txt_DateDepose.Text) == null)
         {
             Message.ShowInformation(Langue.MsgDateInvalide, Langue.lbl_Menu);
             this.Txt_DateDepose.Focus();
             return;
         }
     }
 }
Esempio n. 13
0
        private void ChargerPosteElectrique()
        {
            try
            {
                if (SessionObject.LsDesPosteElectriques.Count != 0)
                {
                    LstDePosteElectrique = SessionObject.LsDesPosteElectriques;
                    if (LstDePosteElectrique != null && LstDePosteElectrique.Count != 0)
                    {
                        if (!string.IsNullOrEmpty(this.Txt_LibelleDepart.Text))
                        {
                            CsPosteElectrique _LePosteElect = LstDePosteElectrique.FirstOrDefault(p => p.CODE == LaDemande.Branchement.CODEPOSTE);
                            if (_LePosteElect != null && !string.IsNullOrEmpty(_LePosteElect.LIBELLE))
                            {
                                this.Txt_SequenceNumPoste.Text = _LePosteElect.LIBELLE;
                            }
                        }
                    }
                }
                else
                {
                    AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
                    service.ChargerLesPosteElectriqueCompleted += (s, args) =>
                    {
                        if (args != null && args.Cancelled)
                        {
                            return;
                        }
                        SessionObject.LsDesPosteElectriques = args.Result;

                        LstDePosteElectrique    = SessionObject.LsDesPosteElectriques;
                        this.Txt_CodePoste.Text = string.IsNullOrEmpty(_LeBranchement.CODEPOSTE) ? string.Empty : _LeBranchement.CODEPOSTE;
                        if (LstDePosteElectrique != null && LstDePosteElectrique.Count != 0)
                        {
                            if (!string.IsNullOrEmpty(this.Txt_CodePoste.Text))
                            {
                                CsPosteElectrique _LePoste = ClasseMEthodeGenerique.RetourneObjectFromList(LstDePosteElectrique, this.Txt_CodePoste.Text, "CODE");
                                if (_LePoste != null && !string.IsNullOrEmpty(_LePoste.LIBELLE))
                                {
                                    this.Txt_LibellePoste.Text = _LePoste.LIBELLE;
                                }
                            }
                        }
                    };
                    service.ChargerLesPosteElectriqueAsync();
                    service.CloseAsync();
                }
            }
            catch (Exception es)
            {
                MessageBox.Show(es.Message);
            }
        }
 void ChargerMarque()
 {
     try
     {
         if (SessionObject.LstMarque.Count != 0)
         {
             LstMarque = SessionObject.LstMarque;
             if (LstMarque != null && LstMarque.Count != 0)
             {
                 if (!string.IsNullOrEmpty(this.Txt_CodeMarque.Text) &&
                     (string.IsNullOrEmpty(this.Txt_LibelleMarque.Text)))
                 {
                     CsMarqueCompteur _LaMarque = ClasseMEthodeGenerique.RetourneObjectFromList(LstMarque, this.Txt_CodeMarque.Text, "CODE");
                     if (_LaMarque != null && !string.IsNullOrEmpty(_LaMarque.LIBELLE))
                     {
                         this.Txt_LibelleMarque.Text = _LaMarque.LIBELLE;
                     }
                 }
             }
         }
         else
         {
             AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
             service.RetourneToutMarqueCompleted += (s, args) =>
             {
                 LstMarque = new List <CsMarqueCompteur>();
                 if (args != null && args.Cancelled)
                 {
                     return;
                 }
                 LstMarque = args.Result;
                 if (LstMarque != null && LstMarque.Count != 0)
                 {
                     if (!string.IsNullOrEmpty(this.Txt_CodeMarque.Text) &&
                         (string.IsNullOrEmpty(this.Txt_LibelleMarque.Text)))
                     {
                         CsMarqueCompteur _LaMarque = ClasseMEthodeGenerique.RetourneObjectFromList(LstMarque, this.Txt_CodeMarque.Text, "CODE");
                         if (_LaMarque != null && !string.IsNullOrEmpty(_LaMarque.LIBELLE))
                         {
                             this.Txt_LibelleMarque.Text = _LaMarque.LIBELLE;
                         }
                     }
                 }
             };
             service.RetourneToutMarqueAsync();
             service.CloseAsync();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void RemplireOngletEvenement(CsEvenement _leDernierEvt)
        {
            if (!string.IsNullOrEmpty(_leDernierEvt.PERIODE))
            {
                this.Txt_periodeFactureF.Text = ClasseMEthodeGenerique.FormatPeriodeMMAAAA(_leDernierEvt.PERIODE);
            }

            this.Txt_IndexFacture.Text = string.IsNullOrEmpty(_leDernierEvt.INDEXEVT.ToString()) ? string.Empty : _leDernierEvt.INDEXEVT.ToString();
            this.Txt_ConsoFacture.Text = string.IsNullOrEmpty(_leDernierEvt.CONSO.ToString()) ? string.Empty : _leDernierEvt.CONSO.ToString();
            this.Txt_CasFacture.Text   = string.IsNullOrEmpty(_leDernierEvt.CAS) ? string.Empty : _leDernierEvt.CAS;
            Txt_DateFacture.Text       = _leDernierEvt.DATEEVT == null  ? string.Empty : _leDernierEvt.DATEEVT.Value.ToShortDateString();
        }
 void ChargerCadran()
 {
     try
     {
         if (SessionObject.LstCadran.Count != 0)
         {
             LstCadran = SessionObject.LstCadran;
             if (LstCadran != null && LstCadran.Count != 0)
             {
                 if (!string.IsNullOrEmpty(this.Txt_CodeCadran.Text) &&
                     (string.IsNullOrEmpty(this.Txt_LibelleDigit.Text)))
                 {
                     CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CodeCadran.Text, "CODECADRAN");
                     if (_LeCadran != null && !string.IsNullOrEmpty(_LeCadran.LIBELLE))
                     {
                         this.Txt_LibelleDigit.Text = _LeCadran.LIBELLE;
                     }
                 }
             }
         }
         else
         {
             AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
             service.RetourneToutCadranCompleted += (s, args) =>
             {
                 LstCadran = new List <CsCadran>();
                 if (args != null && args.Cancelled)
                 {
                     return;
                 }
                 LstCadran = args.Result;
                 if (LstCadran != null && LstCadran.Count != 0)
                 {
                     if (!string.IsNullOrEmpty(this.Txt_CodeCadran.Text) &&
                         (string.IsNullOrEmpty(this.Txt_LibelleDigit.Text)))
                     {
                         CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CodeCadran.Text, "CODECADRAN");
                         if (_LeCadran != null && !string.IsNullOrEmpty(_LeCadran.LIBELLE))
                         {
                             this.Txt_LibelleDigit.Text = _LeCadran.LIBELLE;
                         }
                     }
                 }
             };
             service.RetourneToutCadranAsync();
             service.CloseAsync();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 17
0
 private void ChargerMaterielBranchement()
 {
     try
     {
         if (SessionObject.LstDeMaterielBrt.Count != 0)
         {
             LstDeMaterielBrt           = SessionObject.LstDeMaterielBrt.Where(p => p.PRODUIT == LaDemande.LaDemande.PRODUIT).ToList();
             this.Txt_CodeMateriel.Text = string.IsNullOrEmpty(_LeBranchement.NATBRT) ? string.Empty : _LeBranchement.NATBRT;
             if (LstDeMaterielBrt != null && LstDeMaterielBrt.Count != 0)
             {
                 if (!string.IsNullOrEmpty(this.Txt_CodeMateriel.Text))
                 {
                     CsMaterielBranchement _LeMateriel = ClasseMEthodeGenerique.RetourneObjectFromList(LstDeMaterielBrt, this.Txt_CodeMateriel.Text, "CODE");
                     if (_LeMateriel != null && !string.IsNullOrEmpty(_LeMateriel.LIBELLE))
                     {
                         this.Txt_LibelleMateriel.Text = _LeMateriel.LIBELLE;
                     }
                 }
             }
         }
         else
         {
             AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
             service.RetourneMaterielBranchementCompleted += (s, args) =>
             {
                 if ((args != null && args.Cancelled) || (args.Error != null))
                 {
                     return;
                 }
                 SessionObject.LstDeMaterielBrt = args.Result;
                 LstDeMaterielBrt           = SessionObject.LstDeMaterielBrt.Where(p => p.PRODUIT == LaDemande.LaDemande.PRODUIT).ToList();
                 this.Txt_CodeMateriel.Text = string.IsNullOrEmpty(_LeBranchement.NATBRT) ? string.Empty : _LeBranchement.NATBRT;
                 if (LstDeMaterielBrt != null && LstDeMaterielBrt.Count != 0)
                 {
                     if (!string.IsNullOrEmpty(this.Txt_CodeMateriel.Text))
                     {
                         CsMaterielBranchement _LeMateriel = ClasseMEthodeGenerique.RetourneObjectFromList(LstDeMaterielBrt, this.Txt_CodeMateriel.Text, "CODE");
                         if (_LeMateriel != null && !string.IsNullOrEmpty(_LeMateriel.LIBELLE))
                         {
                             this.Txt_LibelleMateriel.Text = _LeMateriel.LIBELLE;
                         }
                     }
                 }
             };
             service.RetourneMaterielBranchementAsync();
             service.CloseAsync();
         }
     }
     catch (Exception es)
     {
         throw es;
     }
 }
Esempio n. 18
0
 private void btn_diametre_Click(object sender, RoutedEventArgs e)
 {
     //this.btn_diametre.IsEnabled = false;
     if (LstDiametreBrt.Count != 0)
     {
         List <object>    _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstDiametreBrt);
         UcListeGenerique ctr     = new UcListeGenerique(_LstObj, "DIAMETRE", "LIBELLE", Langue.lbl_ListeDiametre);
         ctr.Closed += new EventHandler(galatee_OkClickedBtnDiametre);
         ctr.Show();
     }
     this.btn_diametre.IsEnabled = true;
 }
 private void Txt_DateEvt_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (this.Txt_DateEvt.Text.Length == SessionObject.Enumere.TailleDate)
     {
         if (ClasseMEthodeGenerique.IsDateValide(this.Txt_DateEvt.Text) == null)
         {
             DialogResult dialogue = new DialogResult("Date invalide", "Saisie date", false, true, false);
             dialogue.Closed += new EventHandler(dialogue_Closed);
             dialogue.Show();
         }
     }
 }
        private void ChargerDonneeDuSite()
        {
            try
            {
                if (SessionObject.LstCentre != null && SessionObject.LstCentre.Count > 0)
                {
                    LstCentrePerimetre = Shared.ClasseMEthodeGenerique.RetourCentreByPerimetre(SessionObject.LstCentre.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList(), UserConnecte.listeProfilUser);
                    lstSite            = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentrePerimetre);
                    foreach (Galatee.Silverlight.ServiceAccueil.CsCentre item in LstCentrePerimetre)
                    {
                        lesCentreCaisse.Add(item.PK_ID);
                    }

                    if (lstSite.Count == 1)
                    {
                        this.Txt_CodeSite.Text    = lstSite.First().CODE;
                        this.Txt_LibelleSite.Text = lstSite.First().LIBELLE;
                        this.Txt_CodeSite.Tag     = lstSite.First().PK_ID;
                        lsiteCentre             = LstCentrePerimetre.Where(t => t.CODESITE == lstSite.First().CODE).ToList();
                        this.btn_Site.IsEnabled = false;
                    }
                    if (LstCentrePerimetre.Count == 1)
                    {
                        this.Txt_CodeCentre.Text    = LstCentrePerimetre.First().CODE;
                        this.Txt_LibelleCentre.Text = LstCentrePerimetre.First().LIBELLE;
                        this.Txt_CodeCentre.Tag     = LstCentrePerimetre.First().PK_ID;
                    }
                    return;
                }
                Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service.ListeDesDonneesDesSiteCompleted += (s, args) =>
                {
                    if (args != null && args.Cancelled)
                    {
                        return;
                    }
                    SessionObject.LstCentre = args.Result;
                    List <Galatee.Silverlight.ServiceAccueil.CsCentre> LstCentre = Shared.ClasseMEthodeGenerique.RetourCentreByPerimetre(SessionObject.LstCentre.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList(), UserConnecte.listeProfilUser);
                    List <Galatee.Silverlight.ServiceAccueil.CsSite>   lstSite   = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentre);
                    foreach (Galatee.Silverlight.ServiceAccueil.CsCentre item in LstCentre)
                    {
                        lesCentreCaisse.Add(item.PK_ID);
                    }
                };
                service.ListeDesDonneesDesSiteAsync(false);
                service.CloseAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 private void RemplireLibelle()
 {
     try
     {
         if (SessionObject.LstFrequence.Count != 0 && this.Txt_CodeFrequence.Text.Length == SessionObject.Enumere.TailleMoisDeFacturation)
         {
             CsFrequence _LaFrequence = ClasseMEthodeGenerique.RetourneObjectFromList(SessionObject.LstFrequence, this.Txt_CodeFrequence.Text, "CODE");
             if (_LaFrequence != null)
             {
                 this.Txt_LibelleFrequence.Text = _LaFrequence.LIBELLE;
             }
         }
         if (SessionObject.LstMois.Count != 0 && this.Txt_CodeMoisIndex.Text.Length == SessionObject.Enumere.TailleMoisDeFacturation)
         {
             CsMois _LeMois = ClasseMEthodeGenerique.RetourneObjectFromList(SessionObject.LstMois, this.Txt_CodeMoisIndex.Text, "CODE");
             if (_LeMois != null)
             {
                 this.Txt_LibelleMoisIndex.Text = _LeMois.LIBELLE;
             }
         }
         if (SessionObject.LstMois.Count != 0 && this.Txt_CodeMoisFacturation.Text.Length == SessionObject.Enumere.TailleMoisDeFacturation)
         {
             CsMois _LeMois = ClasseMEthodeGenerique.RetourneObjectFromList(SessionObject.LstMois, this.Txt_CodeMoisFacturation.Text, "CODE");
             if (_LeMois != null)
             {
                 this.Txt_LibMoisFact.Text = _LeMois.LIBELLE;
             }
         }
         if (SessionObject.LstForfait.Count != 0 && this.Txt_CodeForfait.Text.Length == SessionObject.Enumere.TailleForfait)
         {
             CsForfait _LeForfait = ClasseMEthodeGenerique.RetourneObjectFromList(SessionObject.LstForfait, this.Txt_CodeForfait.Text, "CODE");
             if (_LeForfait != null)
             {
                 this.Txt_LibelleForfait.Text = _LeForfait.LIBELLE;
             }
         }
         if (!string.IsNullOrEmpty(this.Txt_CodeTarif.Text) &&
             SessionObject.LstTarif != null && SessionObject.LstTarif.Count != 0 &&
             this.Txt_CodeTarif.Text.Length == SessionObject.Enumere.TailleTarif)
         {
             CsTarif _LeTarif = ClasseMEthodeGenerique.RetourneObjectFromList(SessionObject.LstTarif, this.Txt_CodeTarif.Text, "CODE");
             if (_LeTarif != null)
             {
                 this.Txt_LibelleTarif.Text = _LeTarif.LIBELLE;
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 22
0
 private void btn_zone_Click(object sender, RoutedEventArgs e)
 {
     if (LstZone != null && LstZone.Count != 0)
     {
         if ((int)laDetailDemande.Ag.FK_IDCENTRE != 0)
         {
             List <object>    _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstZone.Where(p => p.FK_IDCENTRE == (int)laDetailDemande.Ag.FK_IDCENTRE).ToList());
             UcListeGenerique ctr     = new UcListeGenerique(_LstObj, "CODE", "LIBELLE", Langue.lbl_ListeQuartiers);
             ctr.Closed += new EventHandler(galatee_OkClickedBtnTournee);
             ctr.Show();
         }
     }
 }
        private void ChargerPosteElectrique()
        {
            try
            {
                //if (SessionObject.LsDesPosteElectriques .Count != 0)
                //{
                //    LstDePosteElectrique = SessionObject.LsDesPosteElectriques;
                //    if (LstDePosteElectrique != null && LstDePosteElectrique.Count != 0)
                //    {
                //        if (!string.IsNullOrEmpty(this.Txt_LibelleDepart .Text))
                //        {
                //            CsPosteElectrique _LePosteElect = LstDePosteElectrique.FirstOrDefault(p => p.CODE == LaDemande.Branchement.CODEPOSTE);
                //            if (_LePosteElect != null && !string.IsNullOrEmpty(_LePosteElect.LIBELLE))
                //                this.Txt_SequenceNumPoste.Text = _LePosteElect.LIBELLE;
                //        }
                //    }

                //}
                //else
                //{
                AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
                service.RetourneMaterielBranchementCompleted += (s, args) =>
                {
                    if ((args != null && args.Cancelled) || (args.Error != null))
                    {
                        return;
                    }
                    SessionObject.LstDeMaterielBrt = args.Result;
                    LstDeMaterielBrt           = SessionObject.LstDeMaterielBrt.Where(p => p.PRODUIT == LaDemande.LaDemande.PRODUIT).ToList();
                    this.Txt_CodeMateriel.Text = string.IsNullOrEmpty(_LeBranchement.NATBRT) ? string.Empty : _LeBranchement.NATBRT;
                    if (LstDeMaterielBrt != null && LstDeMaterielBrt.Count != 0)
                    {
                        if (!string.IsNullOrEmpty(this.Txt_CodeMateriel.Text))
                        {
                            CsMaterielBranchement _LeMateriel = ClasseMEthodeGenerique.RetourneObjectFromList(LstDeMaterielBrt, this.Txt_CodeMateriel.Text, "CODE");
                            if (_LeMateriel != null && !string.IsNullOrEmpty(_LeMateriel.LIBELLE))
                            {
                                this.Txt_LibelleMateriel.Text = _LeMateriel.LIBELLE;
                            }
                        }
                    }
                };
                service.RetourneMaterielBranchementAsync();
                service.CloseAsync();
                //}
            }
            catch (Exception es)
            {
                MessageBox.Show(es.Message);
            }
        }
 private void ChargerDonneeDuSite()
 {
     try
     {
         if (SessionObject.LstCentre.Count != 0)
         {
             LstCentre = SessionObject.LstCentre;
             lstSite   = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentre);
             if (lstSite != null)
             {
                 List <Galatee.Silverlight.ServiceAccueil.CsSite> _LstSite = lstSite.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList();
                 if (_LstSite.Count == 1)
                 {
                     this.Txt_CodeSite.Text       = _LstSite.First().CODE;
                     this.Txt_LibelleSite.Text    = _LstSite.First().LIBELLE;
                     this.btn_Site.IsEnabled      = false;
                     this.Txt_CodeSite.IsReadOnly = true;
                 }
             }
             return;
         }
         Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         service.ListeDesDonneesDesSiteCompleted += (s, args) =>
         {
             if (args != null && args.Cancelled)
             {
                 return;
             }
             SessionObject.LstCentre = args.Result;
             LstCentre = SessionObject.LstCentre;
             lstSite   = ClasseMEthodeGenerique.RetourneSiteByCentre(LstCentre);
             if (lstSite != null)
             {
                 List <Galatee.Silverlight.ServiceAccueil.CsSite> _LstSite = lstSite.Where(p => p.CODE != SessionObject.Enumere.Generale).ToList();
                 if (_LstSite.Count == 1)
                 {
                     this.Txt_CodeSite.Text       = _LstSite.First().CODE;
                     this.Txt_LibelleSite.Text    = _LstSite.First().LIBELLE;
                     this.btn_Site.IsEnabled      = false;
                     this.Txt_CodeSite.IsReadOnly = true;
                 }
             }
         };
         service.ListeDesDonneesDesSiteAsync(false);
         service.CloseAsync();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "ChargerDonneeDuSite");
     }
 }
        private void RemplirTypeAction(int Index)
        {
            try
            {
                int caseSwitch = Index;
                switch (caseSwitch)
                {
                case 0:
                {
                    this.tab4_dataGrid1.Visibility = System.Windows.Visibility.Collapsed;
                    this.tab4_dataGrid2.Visibility = System.Windows.Visibility.Collapsed;
                    this.tab4_dataGrid3.Visibility = System.Windows.Visibility.Visible;
                    if (leClasseurClient != null)
                    {
                        //_LeClasseur.LeCompteClient.ToutLClient = new List<CsLclient>();

                        tab4_dataGrid3.ItemsSource = null;
                        List <CsLclient> _ToutLeCompteClient    = ClasseMEthodeGenerique.RetourneListCopy <CsLclient>(leClasseurClient.ToutLClient.OrderBy(t => t.REFEM).ToList());
                        List <CsLclient> _ToutLeCompteClientReg = leClasseurClient.ToutLClient.Where(p => p.DC == "C").ToList();
                        RemplireOngletToutLeCompte(_ToutLeCompteClient.OrderBy(t => t.REFEM).ToList());
                    }
                }
                break;

                case 1:
                {
                    this.tab4_dataGrid1.Visibility = System.Windows.Visibility.Visible;
                    this.tab4_dataGrid2.Visibility = System.Windows.Visibility.Collapsed;
                    this.tab4_dataGrid3.Visibility = System.Windows.Visibility.Collapsed;
                    tab4_dataGrid1.ItemsSource     = null;
                    RemplireOngletReglement(LstReglementClient.OrderBy(t => t.REFEM).ToList());
                }
                break;

                case 2:
                {
                    this.tab4_dataGrid1.Visibility  = System.Windows.Visibility.Collapsed;
                    this.tab4_dataGrid2.Visibility  = System.Windows.Visibility.Visible;
                    this.tab4_dataGrid3.Visibility  = System.Windows.Visibility.Collapsed;
                    this.tab4_dataGrid2.ItemsSource = null;
                    RemplireOngletFacture(LstFactureClient.OrderBy(t => t.REFEM).ToList());
                }
                break;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 private void btn_Produit_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <object>    _LstProduit = ClasseMEthodeGenerique.RetourneListeObjet(ListeDesProduitDuSite);
         UcListeGenerique ctr         = new UcListeGenerique(_LstProduit, "CODE", "LIBELLE", Langue.lbl_ListeProduit);
         ctr.Closed += new EventHandler(galatee_OkClickedProduit);
         ctr.Show();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Langue.lbl_Menu);
     }
 }
 private void btn_ModeApp_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <object>    _LstObject = ClasseMEthodeGenerique.RetourneListeObjet(ListeModeApplicationTarif.OrderBy(p => p.CODE).ToList());
         UcListeGenerique ctr        = new UcListeGenerique(_LstObject, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_ModeApp_OkClicked);
         ctr.Show();
     }
     catch (Exception ex)
     {
         string error = ex.Message;
     }
 }
 private void btn_Site_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <object>    _LstObject = ClasseMEthodeGenerique.RetourneListeObjet(lstSite.OrderBy(p => p.CODE).ToList());
         UcListeGenerique ctr        = new UcListeGenerique(_LstObject, "CODE", "LIBELLE", "Liste");
         ctr.Closed    += new EventHandler(galatee_OkSiteClicked);
         this.IsEnabled = false;
         ctr.Show();
     }
     catch (Exception ex)
     {
         string error = ex.Message;
     }
 }
Esempio n. 29
0
 private void btn_depart_Click(object sender, RoutedEventArgs e)
 {
     this.btn_depart.IsEnabled = false;
     if (LstDepart != null && LstDepart.Count != 0)
     {
         List <object> _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstDepart);
         Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
         _LstColonneAffich.Add("CODE", "CODE DEPART");
         _LstColonneAffich.Add("LIBELLE", "LIBELLE");
         List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
         MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste de départ");
         ctrl.Closed += new EventHandler(galatee_OkClickedbtn_depart);
         ctrl.Show();
     }
 }
Esempio n. 30
0
 private void btn_QuartierPoste_Click_1(object sender, RoutedEventArgs e)
 {
     this.btn_QuartierPoste.IsEnabled = false;
     if (LstQuartierSite != null && LstQuartierSite.Count != 0)
     {
         List <object> _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstQuartierSite);
         Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
         _LstColonneAffich.Add("CODE", "CODE");
         _LstColonneAffich.Add("LIBELLE", "QUARTIER");
         List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
         MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, Langue.lbl_ListeDiametre);
         ctrl.Closed += new EventHandler(galatee_OkClickedBtnQuartier);
         ctrl.Show();
     }
 }