Esempio n. 1
0
        private void ChargerListeCaisseDispo()
        {
            //UserConnecte.Centre = Silverlight.Classes.IsolatedStorage.getCentre();
            CaisseServiceClient srv = new CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse"));

            srv.ListeCaisseDisponibleCompleted += (ss, ee) =>
            {
                try
                {
                    if (ee.Cancelled || ee.Error != null || ee.Result == null)
                    {
                        string error = ee.Error.InnerException.ToString();
                        return;
                    }
                    SessionObject.ListeCaisse = ee.Result;
                    if (SessionObject.ListeCaisse.Count > 0)
                    {
                        LoadInfoInControl();
                    }
                }
                catch (Exception ex)
                {
                    Message.ShowError(ex, Galatee.Silverlight.Resources.Caisse.Langue.errorTitle);
                }
            };
            srv.ListeCaisseDisponibleAsync(UserConnecte.Centre, UserConnecte.matricule);
        }