Esempio n. 1
0
        private void RetourneHistoriqueClient(int idClient)
        {
            int response = LoadingManager.BeginLoading(Galatee.Silverlight.Resources.Accueil.Langue.En_Cours);

            this.dtg_HistoriquePassWord.ItemsSource = null;
            AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration"));

            client.RetourneHistoriqueConnectionCompleted += (ss, res) =>
            {
                if (res.Cancelled || res.Error != null)
                {
                    string error = res.Error.Message;
                    Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle);
                    LoadingManager.EndLoading(response);
                    return;
                }
                if (res.Result == null)
                {
                    Message.ShowInformation(Galatee.Silverlight.Resources.Langue.msgNodata, Galatee.Silverlight.Resources.Langue.informationTitle);
                    LoadingManager.EndLoading(response);
                    return;
                }
                List <CsHistoriquePassword> lstresult = res.Result;
                lstresult = lstresult.Where(c => c.DATECREATION != null).ToList();
                lstresult = lstresult.OrderByDescending(x => x.DATECREATION).ToList();
                dtg_HistoriquePassWord.ItemsSource = null;
                dtg_HistoriquePassWord.ItemsSource = lstresult;
                dtg_HistoriquePassWord.Tag         = lstresult;


                LoadingManager.EndLoading(response);
            };
            client.RetourneHistoriqueConnectionAsync(idClient);
        }