Example #1
0
        public void UpdateTimeInfo(TimeInformationViewModel viewModel)
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException("viewModel", "Argument cannot be null.");
            }

            CaisseServiceClient service = new CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse"));

            service.ChargerListeCodeRegroupementCompleted += new EventHandler <ChargerListeCodeRegroupementCompletedEventArgs>(FillData);

            var Status = new AsyncCallStatus <ChargerListeCodeRegroupementCompletedEventArgs>();

            service.ChargerListeCodeRegroupementAsync(Status);
            m_autoResetEvent.WaitOne();

            //if (Status.CompletedEventArgs. != null)
            //{
            //    throw Status.CompletedEventArgs.Error;
            //}
            List <CsRegCli> groupingCode = new List <CsRegCli>();

            groupingCodes = Status.CompletedEventArgs.Result;
            //viewModel.CurrentCode.AddRange(Status.CompletedEventArgs.Result);
        }