예제 #1
0
 private void RemplirListeProduit()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllProduitAsync();
         client.SelectAllProduitCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.Centre);
             }
             Cbo_Produit.ItemsSource       = null;
             Cbo_Produit.ItemsSource       = args.Result;
             Cbo_Produit.SelectedValuePath = "PK_ID";
             Cbo_Produit.DisplayMemberPath = "LIBELLE";
             listProduit = args.Result;
         };
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void GetDataNew()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllCoperDemandeCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.CoperDemande);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             donnesDatagrid.Clear();
             if (args.Result != null)
             {
                 foreach (var item in args.Result.OrderBy(t => t.PRODUIT).ThenBy(j => j.TYPEDEMANDE).ThenBy(k => k.REGLAGECOMPTEUR))
                 {
                     donnesDatagrid.Add(item);
                 }
             }
             //dtgrdParametre.ItemsSource = donnesDatagrid;
         };
         client.SelectAllCoperDemandeAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 void cbo_refTables_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         //CsInit tableselected = (cbo_refTables.SelectedItem as CsInit);
         //List<cZone> zoones = (from p in zonesFromDB
         //                      select p).Where(p => p.Table == tableselected.LIBELLE).ToList();
         ParametrageClient clients = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));
         clients.SELECT_INIT_SELECT_COLUMNS_BY_NTABLECompleted += (send, es) =>
         {
             List <CsZone> zoones = new List <CsZone>();
             zoones.AddRange(es.Result);
             cbo_refZones.ItemsSource       = null;
             cbo_refZones.SelectedValuePath = "Table";
             cbo_refZones.DisplayMemberPath = "Libelle";
             cbo_refZones.ItemsSource       = zoones;
             cbo_refZones.SelectedItem      = zoones[2];
         };
         clients.SELECT_INIT_SELECT_COLUMNS_BY_NTABLEAsync(int.Parse((cbo_refTables.SelectedItem as CsInit).NTABLE));
     }
     catch (Exception ex)
     {
         string error = ex.Message;
     }
 }
예제 #4
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            ValiderSaisieDatagrid();
            List <CsTypeDemande> liste = new List <CsTypeDemande>();

            foreach (CsTypeDemande cas in DonnesDatagrid)
            {
                liste.Add(cas);
            }

            ParametrageClient insert = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));

            insert.insertOrUpdateTypeDemandeCompleted += (snder, insertR) =>
            {
                if (insertR.Cancelled || insertR.Error != null)
                {
                    string error = insertR.Error.Message;
                    MessageBox.Show(error, "insertOrUpdateTypeDemande", MessageBoxButton.OK);
                    desableProgressBar();
                    return;
                }

                if (insertR.Result == null || insertR.Result.Count == 0)
                {
                    MessageBox.Show("Error on insert ", "insertOrUpdateTypeDemande", MessageBoxButton.OK);
                    desableProgressBar();
                    return;
                }

                InitialiserDonneeDataGrid(insertR.Result);
            };
            insert.insertOrUpdateTypeDemandeAsync(liste, majData);
        }
예제 #5
0
 private void GetData()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllTypeCentreCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.Show(error, Languages.LibelleTypeCentre);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Galatee.Silverlight.Resources.Devis.Languages.msgErreurChargementDonnees, Languages.TacheDevis);
                 return;
             }
             donnesDatagrid.Clear();
             if (args.Result != null)
             {
                 foreach (var pTypeCentre in args.Result)
                 {
                     donnesDatagrid.Add(pTypeCentre);
                 }
             }
             //dtgrdParametre.ItemsSource = DonnesDatagrid;
         };
         client.SelectAllTypeCentreAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeASupprimer);
                }
                if (dtgrdParametre.SelectedItems.Count > 0)
                {
                    var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.Centre, Languages.QuestionSuppressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                    messageBox.OnMessageBoxClosed += (_, result) =>
                    {
                        if (messageBox.Result == MessageBoxResult.OK)
                        {
                            if (dtgrdParametre.SelectedItem != null)
                            {
                                var selected = dtgrdParametre.SelectedItem as CsCentre;

                                if (selected != null)
                                {
                                    ParametrageClient delete = new ParametrageClient(Utility.Protocole(),
                                                                                     Utility.EndPoint("Parametrage"));
                                    delete.DeleteCentreCompleted += (del, argDel) =>
                                    {
                                        if (argDel.Cancelled || argDel.Error != null)
                                        {
                                            Message.ShowError(argDel.Error.Message, Languages.Centre);
                                            return;
                                        }

                                        if (argDel.Result == false)
                                        {
                                            Message.ShowError(Languages.ErreurSuppressionDonnees, Languages.Centre);
                                            return;
                                        }

                                        DonnesDatagrid.Remove(selected);
                                    };
                                    delete.DeleteCentreAsync(selected);
                                }
                            }
                        }
                        else
                        {
                            return;
                        }
                    };
                    messageBox.Show();
                }
                else
                {
                    throw new Exception(Languages.SelectionnerUnElement);
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Centre);
            }
        }
예제 #7
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ParametrageClient cls = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));

            cls.insertOrUpdateTA0Completed += (ss, resut) =>
            {
                if (resut.Cancelled || resut.Error != null)
                {
                    string error = resut.Error.Message;
                    MessageBox.Show(error, "insertTA0", MessageBoxButton.OK);
                    desableProgressBar();
                    return;
                }

                if (resut.Result == false)
                {
                    MessageBox.Show("Error on insert ", "insertTA0", MessageBoxButton.OK);
                    desableProgressBar();
                    return;
                }

                GetData(num);
            };
            cls.insertOrUpdateTA0Async(newData, majData);
        }
 private void RetourneActivite()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllActiviteCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.CoperDemande);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             this.Cbo_Activite.ItemsSource       = null;
             this.Cbo_Activite.DisplayMemberPath = "Activite_Libelle";
             this.Cbo_Activite.ItemsSource       = args.Result;
         };
         client.SelectAllActiviteAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #9
0
 private void GetDataNew()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllSitesCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.Site);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             donnesDatagrid.Clear();
             if (args.Result != null)
             {
                 foreach (var pSite in args.Result)
                 {
                     donnesDatagrid.Add(pSite);
                 }
             }
         };
         client.SelectAllSitesAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #10
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("Voulez vous vraiment supprimer cet element", "Confirmation", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                CsTypeDemande selected = dgINIT.SelectedItem as CsTypeDemande;
                if (selected != null)
                {
                    ParametrageClient delete = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));
                    delete.Delete_TYPEDEMANDECompleted += (del, argDel) =>
                    {
                        if (argDel.Cancelled || argDel.Error != null)
                        {
                            string error = argDel.Error.Message;
                            MessageBox.Show(error, "Delete_TYPEDEMANDE", MessageBoxButton.OK);
                            desableProgressBar();
                            return;
                        }

                        if (argDel.Result == false)
                        {
                            MessageBox.Show("Error on insert/update ", "Delete_TYPEDEMANDE", MessageBoxButton.OK);
                            desableProgressBar();
                            return;
                        }

                        DonnesDatagrid.Remove(selected);
                    };
                    delete.Delete_TYPEDEMANDEAsync(selected.CENTRE, selected.TDEM);
                }
                else
                {
                    MessageBox.Show("vous devez selectionner un item dans la liste ");
                }
            }
        }
 private void GetData()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllConsommateurCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.LibelleConsommateur);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             DonnesDatagrid.Clear();
             if (args.Result != null)
             {
                 foreach (var item in args.Result)
                 {
                     DonnesDatagrid.Add(item);
                 }
             }
             dtgrdParametre.ItemsSource = DonnesDatagrid;
         };
         client.SelectAllConsommateurAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void RemplirProduit()
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.SelectAllProduitCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.Show(error, Languages.Produit);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             else
             {
                 CboProduit.ItemsSource       = args.Result;
                 CboProduit.SelectedValuePath = "PK_ID";
                 CboProduit.DisplayMemberPath = "LIBELLE";
             }
         };
         client.SelectAllProduitAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #13
0
 private void InsererModel(List <CsCouleurScelle> leModel)
 {
     try
     {
         ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
         client.InsertCouleurCompleted += (ssender, args) =>
         {
             if (args.Cancelled || args.Error != null)
             {
                 string error = args.Error.Message;
                 Message.ShowError(error, Languages.CoperDemande);
                 return;
             }
             if (args.Result == null)
             {
                 Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                 return;
             }
             if (args.Result == true)
             {
                 Message.ShowInformation("Mise à jour effectuée avec succès", "Parametrage");
                 GetData();
             }
             else
             {
                 Message.ShowInformation("Erreur lors de la Mise à jour", "Parametrage");
             }
         };
         client.InsertCouleurAsync(leModel);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #14
0
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("RptParam_Title", Languages.ListeExoneration.ToUpper());
                dictionaryParam.Add("Rpt_RegCli", Languages.Regroupement.ToUpper());
                dictionaryParam.Add("Rpt_Produit", Languages.LibelleProduit.ToUpper());
                dictionaryParam.Add("Rpt_Centre", Languages.Centre.ToUpper());
                dictionaryParam.Add("Rpt_Avance", Languages.Avance.ToUpper());
                dictionaryParam.Add("Rpt_Dossier", Languages.Dossier.ToUpper());
                dictionaryParam.Add("Rpt_Police", Languages.Police.ToUpper());
                dictionaryParam.Add("Rpt_Traitement", Languages.Traitement.ToUpper());

                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }

                var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.RegroupementClient, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                messageBox.OnMessageBoxClosed += (_, result) =>
                {
                    if (messageBox.Result == MessageBoxResult.OK)
                    {
                        string key     = Utility.getKey();
                        var    service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                        service.EditerListeRegExoCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                Message.ShowError(print.Error.Message, Languages.RegroupementExoneration);
                                return;
                            }
                            if (!print.Result)
                            {
                                Message.ShowError(Languages.ErreurImpressionDonnees, Languages.RegroupementExoneration);
                                return;
                            }
                            Utility.ActionImpressionDirect(null, key, "RegExo", "Parametrage");
                        };
                        service.EditerListeRegExoAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                messageBox.Show();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.RegroupementExoneration);
            }
        }
 private void Supprimer()
 {
     try
     {
         if (DonnesDatagrid.Count == 0)
         {
             throw new Exception(Languages.AucuneDonneeASupprimer);
         }
         if (dtgrdParametre.SelectedItem != null && dtgrdParametre.SelectedItems.Count == 1)
         {
             var w = new MessageBoxControl.MessageBoxChildWindow(Languages.Parametrage, Languages.QuestionSuppressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
             w.OnMessageBoxClosed += (_, result) =>
             {
                 if (w.Result == MessageBoxResult.OK)
                 {
                     var selected = dtgrdParametre.SelectedItem as CsGroupeValidation;
                     if (selected != null)
                     {
                         ParametrageClient delete = new ParametrageClient(Utility.Protocole(),
                                                                          Utility.EndPoint("Parametrage"));
                         delete.DeleteGroupeValidationCompleted += (del, argDel) =>
                         {
                             if (argDel.Cancelled || argDel.Error != null)
                             {
                                 Message.Show(argDel.Error.Message, Languages.Parametrage);
                                 return;
                             }
                             if (argDel.Result == false)
                             {
                                 Message.Show(Languages.ErreurSuppressionDonnees, Languages.Parametrage);
                                 return;
                             }
                             DonnesDatagrid.Remove(selected);
                             GetData();
                         };
                         delete.DeleteGroupeValidationAsync(new List <CsGroupeValidation>()
                         {
                             selected
                         });
                     }
                 }
                 else
                 {
                     return;
                 }
             };
             w.Show();
         }
         else
         {
             throw new Exception(Languages.SelectionnerUnElement);
         }
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.Parametrage);
     }
 }
        private void RemplirFonction()
        {
            try
            {
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                int back = LoadingManager.BeginLoading("Chargement des informations de l'étape suivante");
                //Récupération des informations de la demande
                client.GetInfoDemandeWorkflowByListCodeDemandeCompleted += (dsender, dargs) =>
                {
                    if (dargs.Cancelled || dargs.Error != null)
                    {
                        string error = dargs.Error.Message;
                        Message.ShowError(error, Languages.txtDevis);
                    }

                    if (null != dargs.Result)
                    {
                        _OperationID = dargs.Result.First().FK_IDOPERATION;
                        _workflowId  = dargs.Result.First().FK_IDWORKFLOW;
                        _centreID    = dargs.Result.First().FK_IDCENTRE;
                        _idEtape     = dargs.Result.First().FK_IDETAPEACTUELLE;
                        foreach (var item in dargs.Result)
                        {
                            LesCodeDemandeWkf.Add(item.CODE);
                            _NumDemande.Add(item.CODE_DEMANDE_TABLETRAVAIL);
                            _DemandeID.Add(int.Parse(item.FK_IDLIGNETABLETRAVAIL));
                        }

                        client.RecupererInfoEtapeSuivanteByCodeWorkflowCompleted += (ssender, args) =>
                        {
                            LoadingManager.EndLoading(back);
                            if (args.Cancelled || args.Error != null)
                            {
                                string error = args.Error.Message;
                                Message.ShowError(error, Languages.txtDevis);
                            }

                            if (args.Result.key != null && args.Result.value.key != null &&
                                args.Result.value.value != null)
                            {
                                _infoNextStep = new KeyValuePair <CsCopieDmdCircuit, KeyValuePair <CsGroupeValidation,
                                                                                                   List <CsRHabilitationGrouveValidation> > >(args.Result.key,
                                                                                                                                              new KeyValuePair <CsGroupeValidation, List <CsRHabilitationGrouveValidation> >(args.Result.value.key, args.Result.value.value));

                                this.Txt_codeFonction.Text = _infoNextStep.Value.Key.GROUPENAME;
                                this.Txt_codeFonction.Tag  = _infoNextStep.Value.Key.PK_ID;
                            }
                        };
                        client.RecupererInfoEtapeSuivanteByCodeWorkflowAsync(dargs.Result.First().CODE);
                    }
                };
                client.GetInfoDemandeWorkflowByListCodeDemandeAsync(LesCodeDemande);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                dictionaryParam.Add("RptParam_CODE", Languages.Code.ToUpper());
                dictionaryParam.Add("RptParam_PRODUIT", Languages.LibelleProduit.ToUpper());
                dictionaryParam.Add("RptParam_LibelleDIAMETRE", Languages.LibelleDIAMETRE.ToUpper());
                dictionaryParam.Add("RptParam_DESIGNATION", Languages.lblDESIGNATION.ToUpper());
                dictionaryParam.Add("RptParam_DIAMETRE", Languages.LibelleDIAMETRE.ToUpper());
                dictionaryParam.Add("RptParam_QUANTITY", Languages.LibelleQUANTITY.ToUpper());

                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("RptParam_Title", Languages.ListeCaisse.ToUpper());
                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }
                var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.LibelleProduit, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                messageBox.OnMessageBoxClosed += (_, result) =>
                {
                    if (messageBox.Result == MessageBoxResult.OK)
                    {
                        string key     = Utility.getKey();
                        var    service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                        service.EditerListeFournitureCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                string error = print.Error.Message;
                                Message.ShowError(error, Languages.LibelleProduit);
                            }
                            if (!print.Result)
                            {
                                Message.ShowError(Languages.ErreurImpressionDonnees, Languages.LibelleProduit);
                            }
                            Utility.ActionImpressionDirect(null, key, "Fourniture", "Parametrage");
                        };
                        //service.EditerListeCaisseAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                messageBox.Show();
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Languages.Fourniture);
            }
        }
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                dictionaryParam.Add("RptParam_Code", Languages.Code.ToUpper());
                dictionaryParam.Add("RptParam_Libelle", Languages.Libelle.ToUpper());
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("RptParam_Title", Languages.ListeCelluleSiege.ToUpper());

                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }

                var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.LibelleCelluleSiege, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                messageBox.OnMessageBoxClosed += (_, result) =>
                {
                    if (messageBox.Result == MessageBoxResult.OK)
                    {
                        var key     = Utility.getKey();
                        var service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                        service.EditerListeCelluleDuSiegeCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                var dialogResult = new DialogResult(print.Error.Message, Languages.LibelleCelluleSiege, false, true, false);
                                dialogResult.Closed += new EventHandler(DialogResultOk);
                                dialogResult.Show();
                            }
                            if (!print.Result)
                            {
                                var dialogResult = new DialogResult(Languages.ErreurImpressionDonnees, Languages.LibelleCelluleSiege, false, true, false);
                                dialogResult.Closed += new EventHandler(DialogResultOk);
                                dialogResult.Show();
                            }
                            Utility.ActionImpressionDirect(null, key, "CelluleDuSiege", "Parametrage");
                        };
                        service.EditerListeCelluleDuSiegeAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                messageBox.Show();
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Languages.LibelleCelluleSiege);
            }
        }
        private void Imprimer()
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                if (ListeRedevance != null && ListeRedevance.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }
                dictionaryParam.Add("RptParam_Centre", Languages.Centre.ToUpper());
                dictionaryParam.Add("RptParam_Libelle", Languages.ColonneLibelle.ToUpper());
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("Rpt_Redevance", Languages.Redevance.ToUpper());
                dictionaryParam.Add("RptParam_Title", Languages.ListeRedevance.ToUpper());
                dictionaryParam.Add("Rpt_Tranche", Languages.ColonneTranche.ToUpper());
                dictionaryParam.Add("Rpt_Produit", Languages.Produit.ToUpper());
                dictionaryParam.Add("Rpt_NatureClient", Languages.NatureClient.ToUpper());
                var w = new MessageBoxControl.MessageBoxChildWindow(Languages.Redevance, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                w.OnMessageBoxClosed += (_, result) =>
                {
                    if (w.Result == MessageBoxResult.OK)
                    {
                        var    service = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));
                        string key     = Utility.getKey();
                        service.EditerListeRedevanceCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                Message.ShowError(print.Error.Message, Languages.Redevance);
                                return;
                            }
                            if (!print.Result)
                            {
                                Message.ShowError(Languages.ErreurImpressionDonnees, Languages.Redevance);
                                return;
                            }
                            Utility.ActionImpressionDirect(null, key, "Redevance", "Parametrage");
                        };
                        service.EditerListeRedevanceAsync(key, dictionaryParam, ListeRedevance);
                    }
                    else
                    {
                        return;
                    }
                };
                w.Show();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Redevance);
            }
        }
        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                dictionaryParam.Add("RptParam_CODE", Languages.Code.ToUpper());
                dictionaryParam.Add("RptParam_Libelle", Languages.Libelle.ToUpper());
                dictionaryParam.Add("RptParam_CFI", Languages.LibelleCFI.ToUpper());
                dictionaryParam.Add("RptParam_CFS", Languages.LibelleCFS.ToUpper());
                dictionaryParam.Add("RptParam_BNI", Languages.LibelleBNI.ToUpper());
                dictionaryParam.Add("RptParam_BNS", Languages.LibelleBNS.ToUpper());
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("RptParam_Title", Languages.ListeDiacomp.ToUpper());
                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }
                var messageBox = new MessageBoxControl.MessageBoxChildWindow(Languages.Diametrecompteur, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                messageBox.OnMessageBoxClosed += (_, result) =>
                {
                    if (messageBox.Result == MessageBoxResult.OK)
                    {
                        string key     = Utility.getKey();
                        var    service = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));
                        service.EditerListeProduitCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                string error = print.Error.Message;
                                Message.ShowError(error, Languages.LibelleProduit);
                            }
                            if (!print.Result)
                            {
                                Message.ShowError(Languages.ErreurImpressionDonnees, Languages.LibelleProduit);
                            }
                            //Utility.ActionImpressionDirect(SessionObject.CheminImpression, key, "Diametrecompteur", "Parametrage");
                            Utility.ActionPreview(key, string.Empty, "Diametrecompteur", "Parametrage");
                        };
                        service.EditerListeProduitAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                messageBox.Show();
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Languages.Diametrecompteur);
            }
        }
        private void Imprimer()
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }
                dictionaryParam.Add("Rpt_Code", Languages.ColonneCode.ToUpper());
                dictionaryParam.Add("RptParam_Libelle", Languages.ColonneLibelle.ToUpper());
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("Rpt_ParamCentre", Languages.Centre.ToUpper());
                dictionaryParam.Add("RptParam_Title", Languages.ListeCommune.ToUpper());
                var w = new MessageBoxControl.MessageBoxChildWindow(Languages.Commune, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                w.OnMessageBoxClosed += (_, result) =>
                {
                    if (w.Result == MessageBoxResult.OK)
                    {
                        var    service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                        string key     = Utility.getKey();
                        service.EditerListeCommuneCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                Message.ShowError(print.Error.Message, Languages.Commune);
                                return;
                            }
                            if (!print.Result)
                            {
                                Message.ShowError(Languages.ErreurImpressionDonnees, Languages.Commune);
                                return;
                            }
                            //Utility.ActionImpressionDirectOrientation(SessionObject.CheminImpression, key, "Commune", "Parametrage", false);

                            Utility.ActionPreview(key, string.Empty, "Commune", "Parametrage");
                        };
                        service.EditerListeCommuneAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                w.Show();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Commune);
            }
        }
        private void BtnCasEcrasable_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.GetCasindEcrasableByCasCompleted += (ssender, args) =>
                {
                    try
                    {
                        if (args.Cancelled || args.Error != null)
                        {
                            string error = args.Error.Message;
                            Message.ShowError(error, Languages.Parametrage);
                            return;
                        }
                        if (args.Result == null)
                        {
                            Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                            return;
                        }
                        if (args.Result != null)
                        {
                            //List<Galatee.Silverlight.ServiceCaisse.CParametre> ListeParam = new List<ServiceCaisse.CParametre>();
                            //foreach (var item in args.Result)
                            //{
                            //    Galatee.Silverlight.ServiceCaisse.CParametre parametre = new ServiceCaisse.CParametre();
                            //    parametre.VALEUR = item.PK_CAS;
                            //    parametre.LIBELLE = item.LIBELLE;
                            //    ListeParam.Add(parametre);
                            //}
                            List <object> _LstCasDeReleve = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(args.Result);
                            Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstCasDeReleve, "PK_CAS", "LIBELLE", Languages.CasDeReleve);
                            ctr.Closed += new EventHandler(form_Closed);
                            ctr.Show();

                            //ListeParam.OrderBy(p => p.VALEUR);
                            //Shared.UcListe form = new Shared.UcListe(ListeParam, true);
                            //form.Closed += form_Closed;
                            //form.Title = "Liste des cas écrasables";
                            //form.Show();
                        }
                    }
                    catch (Exception ex)
                    {
                        Message.ShowError(ex.Message, Languages.Parametrage);
                    }
                };
                client.GetCasindEcrasableByCasAsync();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Parametrage);
            }
        }
        private void Imprimer()
        {
            var dictionaryParam = new Dictionary <string, string>();

            try
            {
                if (DonnesDatagrid.Count == 0)
                {
                    throw new Exception(Languages.AucuneDonneeAImprimer);
                }
                dictionaryParam.Add("RptParam_Code", Languages.ColonneCode.ToUpper());
                dictionaryParam.Add("RptParam_DateCreation", Languages.DateCreation);
                dictionaryParam.Add("RptParam_DateModification", Languages.DateModification);
                dictionaryParam.Add("RptParam_UserCreation", Languages.UserCreation);
                dictionaryParam.Add("RptParam_UserModification", Languages.UserModification);
                dictionaryParam.Add("RptParam_RoleName", Languages.ColonneRoleName.ToUpper());
                dictionaryParam.Add("RptParam_RoleDisplayName", Languages.ColonneRoleDisplayName.ToUpper());
                dictionaryParam.Add("RptParam_EstAdmin", Languages.ColonneEstAdmin.ToUpper());
                dictionaryParam.Add("RptParam_Title", Languages.Fonction.ToUpper());
                var w = new MessageBoxControl.MessageBoxChildWindow(Languages.Parametrage, Languages.QuestionImpressionDonnees, MessageBoxControl.MessageBoxButtons.YesNo, MessageBoxControl.MessageBoxIcon.Question);
                w.OnMessageBoxClosed += (_, result) =>
                {
                    if (w.Result == MessageBoxResult.OK)
                    {
                        string key     = Utility.getKey();
                        var    service = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                        service.EditerListeFonctionCompleted += (snder, print) =>
                        {
                            if (print.Cancelled || print.Error != null)
                            {
                                Message.Show(print.Error.Message, Languages.Parametrage);
                                return;
                            }
                            if (!print.Result)
                            {
                                Message.Show(Languages.ErreurImpressionDonnees, Languages.Parametrage);
                                return;
                            }
                            Utility.ActionImpressionDirect(null, key, "Fonction", "Parametrage");
                        };
                        service.EditerListeFonctionAsync(key, dictionaryParam);
                    }
                    else
                    {
                        return;
                    }
                };
                w.Show();
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Languages.Parametrage);
            }
        }
예제 #24
0
        void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("Voulez vous vraiment supprimer cet element", "Confirmation", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                CsInit selected = dgINIT.SelectedItem as CsInit;
                if (selected != null)
                {
                    ParametrageClient delete = new ParametrageClient(Utility.Protocole(), Utility.EndPoint("Parametrage"));
                    delete.DeleteINITCompleted += (del, argDel) =>
                    {
                        if (argDel.Cancelled || argDel.Error != null)
                        {
                            string error = argDel.Error.Message;
                            MessageBox.Show(error, "DeleteINIT", MessageBoxButton.OK);
                            desableProgressBar();
                            return;
                        }

                        if (argDel.Result == false)
                        {
                            MessageBox.Show("Error on insert/update ", "DeleteINIT", MessageBoxButton.OK);
                            desableProgressBar();
                            return;
                        }

                        int rank = dgINIT.SelectedIndex;
                        int inc  = 0;
                        donnesDatagrid.RemoveAt(rank);

                        dgINIT.ItemsSource = null;
                        columnAmount.Clear();
                        rowcomboselectedObject.Clear();

                        //rowcomboselectedObject = new CsProduit[donnesDatagrid.Count];
                        //rowselectDate = new DateTime?[donnesDatagrid.Count];
                        //columnAmount = new bool[donnesDatagrid.Count];

                        foreach (CsInit tag in donnesDatagrid)
                        {
                            columnAmount.Add(tag.OBLIG == "O" ? true : false);
                            CsProduit prod = produits.FirstOrDefault(p => p.LIBELLE == tag.PRODUIT);
                            rowcomboselectedObject.Add(prod);
                        }

                        dgINIT.ItemsSource = donnesDatagrid;

                        // verifier si l'element supprime est in item des liste NewAdded ou UpdatedList
                        // checkInlistItem(selected);
                    };
                    delete.DeleteINITAsync(selected.CENTRE, selected.PRODUIT, selected.NTABLE, selected.ZONE);
                }
            }
        }
예제 #25
0
        private void GetData()
        {
            int back = 0;

            try
            {
                back = LoadingManager.BeginLoading("Chargement des données en cours...");
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.GetAllCasindCompleted += (ssender, args) =>
                {
                    try
                    {
                        if (args.Cancelled || args.Error != null)
                        {
                            string error = args.Error.Message;
                            LoadingManager.EndLoading(back);
                            Message.ShowError(error, Languages.CasDeReleve);
                            return;
                        }
                        if (args.Result == null)
                        {
                            LoadingManager.EndLoading(back);
                            Message.ShowError(Languages.msgErreurChargementDonnees, Languages.CasDeReleve);
                            return;
                        }
                        DonnesDatagrid.Clear();
                        if (args.Result != null)
                        {
                            foreach (var item in args.Result)
                            {
                                item.SAISIEINDEX    = RetournerLibelleElementSaisie(item.SAISIEINDEX);
                                item.SAISIECOMPTEUR = RetournerLibelleElementSaisie(item.SAISIECOMPTEUR);
                                item.SAISIECONSO    = RetournerLibelleElementSaisie(item.SAISIECONSO);
                                DonnesDatagrid.Add(item);
                            }
                        }
                        dtgrdParametre.ItemsSource = DonnesDatagrid;
                        LoadingManager.EndLoading(back);
                    }
                    catch (Exception ex)
                    {
                        LoadingManager.EndLoading(back);
                        Message.ShowError(ex.Message, Languages.CasDeReleve);
                    }
                };
                client.GetAllCasindAsync();
            }
            catch (Exception ex)
            {
                LoadingManager.EndLoading(back);
                throw ex;
            }
        }
예제 #26
0
        private void InitialisationControle()
        {
            try
            {
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.SelectAllDenominationCompleted += (ssender, args) =>
                {
                    if (args.Cancelled || args.Error != null)
                    {
                        string error = args.Error.Message;
                        Message.ShowError(error, Languages.RegroupementClient);
                    }
                    if (args.Result == null)
                    {
                        Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                        return;
                    }
                    else
                    {
                        if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                            (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                        {
                            if (ObjetSelectionnee != null)
                            {
                            }
                        }
                    }

                    if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                        (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                    {
                        if (ObjetSelectionnee != null)
                        {
                            Txt_Regroupement.Text = ObjetSelectionnee.CODE ?? string.Empty;
                            Txt_Libelle.Text      = ObjetSelectionnee.NOM ?? string.Empty;
                            Txt_Adresse1.Text     = ObjetSelectionnee.ADR1 ?? string.Empty;
                            Txt_Adresse2.Text     = ObjetSelectionnee.ADR2 ?? string.Empty;
                            Txt_CodePostal.Text   = ObjetSelectionnee.CODPOS ?? string.Empty;
                            Txt_Bureau.Text       = ObjetSelectionnee.BUREAU ?? string.Empty;
                            Txt_Traitement.Text   = ObjetSelectionnee.TRAITFAC ?? string.Empty;
                            btnOk.IsEnabled       = false;
                        }
                    }
                };
                client.SelectAllDenominationAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #27
0
        private void GetDataNew()
        {
            //int back = 0;
            try
            {
                //back = LoadingManager.BeginLoading("Veuillez patienter s'il vous plaît, chargement des données en cours...");
                LayoutRoot.Cursor = Cursors.Wait;
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.SelectAllCommuneCompleted += (ssender, args) =>
                {
                    if (args.Cancelled || args.Error != null)
                    {
                        LayoutRoot.Cursor = Cursors.Arrow;
                        string error = args.Error.Message;
                        Message.Show(error, Languages.Parametrage);
                        //LoadingManager.EndLoading(back);
                        return;
                    }
                    if (args.Result == null)
                    {
                        LayoutRoot.Cursor = Cursors.Arrow;
                        Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Commune);
                        //LoadingManager.EndLoading(back);
                        return;
                    }

                    donnesDatagrid.Clear();
                    if (args.Result != null)
                    {
                        //ListeCommune = args.Result;
                        foreach (var pCommune in args.Result)
                        {
                            donnesDatagrid.Add(pCommune);
                        }
                    }
                    //DonnesDatagrid.OrderBy(p => p.PK_ID);
                    //DonnesDatagrid.Distinct();
                    //dtgrdParametre.ItemsSource = DonnesDatagrid;
                    //LoadingManager.EndLoading(back);
                    LayoutRoot.Cursor = Cursors.Arrow;
                };
                client.SelectAllCommuneAsync();
            }
            catch (Exception ex)
            {
                LayoutRoot.Cursor = Cursors.Arrow;
                //LoadingManager.EndLoading(back);
                throw ex;
            }
        }
        private void RemplirListeDesTDEMExistant()
        {
            try
            {
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.SelectAllDTEMCompleted += (ssender, args) =>
                {
                    if (args.Cancelled || args.Error != null)
                    {
                        string error = args.Error.Message;
                        Message.ShowError(error, Silverlight.Resources.Parametrage.Languages.lblModule);
                        return;
                    }
                    if (args.Result == null)
                    {
                        Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                        return;
                    }
                    else
                    {
                        this.CboTDEM.ItemsSource       = args.Result;
                        this.CboTDEM.DisplayMemberPath = "LIBELLE";
                        this.CboTDEM.SelectedValuePath = "PK_ID";

                        if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                            (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                        {
                            if (ObjetSelectionnee != null)
                            {
                                foreach (CsTdem Tdem in CboTDEM.ItemsSource)
                                {
                                    if (Tdem.PK_ID == ObjetSelectionnee.FK_IDTYPEDEMANDE)
                                    {
                                        CboTDEM.SelectedItem = Tdem;
                                        break;
                                    }
                                }
                                CboTDEM.IsEnabled = false;
                            }
                        }
                    }
                };
                client.SelectAllDTEMAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        void GetData()
        {
            int back = LoadingManager.BeginLoading("Chargement de la liste ...");

            lstEtapes = new List <CsCopieDmdCircuit>();
            ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));

            //ON recherche avant tout les demandes qui nous on été affectés, on n'affiche que celle-là,
            //car elle doivent être traitées avant les autres
            client.SelectEtapesFromDemandeCompleted += (__, ar) =>
            {
                LoadingManager.EndLoading(back);
                dtgrdParametre.ItemsSource = null;

                if (ar.Cancelled || ar.Error != null)
                {
                    string error = ar.Error.Message;
                    Message.Show(error, Languages.ListeCodePoste);
                    return;
                }
                if (ar.Result == null)
                {
                    Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                    return;
                }

                lstEtapes = ar.Result.OrderBy(o => o.ORDRE)
                            .ToList();
                LesEtapesCircuits = new ObservableCollection <CsCopieDmdCircuit>();

                if (null != _renvois)
                {
                    foreach (var o in lstEtapes)
                    {
                        if (null != _renvois.FirstOrDefault(r => r.FK_IDETAPEACTUELLE == o.FK_IDETAPE))
                        {
                            LesEtapesCircuits.Add(o);
                        }
                    }
                }
                else
                {
                    LesEtapesCircuits = new ObservableCollection <CsCopieDmdCircuit>(lstEtapes);
                }

                dtgrdParametre.ItemsSource = LesEtapesCircuits;
            };
            client.SelectEtapesFromDemandeAsync(null != dmd.CODE ? dmd.CODE : _infoDmd.CODE);
        }
        private void GetData()
        {
            int back = 0;

            try
            {
                back = LoadingManager.BeginLoading("Chargement des données en cours...");
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.SelectAllFonctionCompleted += (ssender, args) =>
                {
                    try
                    {
                        if (args.Cancelled || args.Error != null)
                        {
                            string error = args.Error.Message;
                            Message.Show(error, Languages.Parametrage);
                            LoadingManager.EndLoading(back);
                            return;
                        }
                        if (args.Result == null)
                        {
                            Message.Show(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                            LoadingManager.EndLoading(back);
                            return;
                        }
                        DonnesDatagrid.Clear();
                        if (args.Result != null)
                        {
                            foreach (var item in args.Result)
                            {
                                DonnesDatagrid.Add(item);
                            }
                        }
                        dtgrdParametre.ItemsSource = DonnesDatagrid;
                        LoadingManager.EndLoading(back);
                    }
                    catch (Exception ex)
                    {
                        Message.Show(ex.Message, Languages.Parametrage);
                    }
                };
                client.SelectAllFonctionAsync();
            }
            catch (Exception ex)
            {
                LoadingManager.EndLoading(back);
                throw ex;
            }
        }