Esempio n. 1
0
        private void AsyncListarAgendaVencida()
        {
            List <string> _list = new List <string>();

            _list.Add(DateTime.Now.ToShortDateString());
            _list.Add("1");

            Task.Factory.StartNew(() => mdata.AgendaVencida(_list))
            .ContinueWith(task =>
            {
                if (task.IsCompleted)
                {
                    ListarAgenda = task.Result;
                }
            });
        }
Esempio n. 2
0
        private void AsyncListarAgendaVencida()
        {
            List <string> _list = new List <string>();

            _list.Add(DateTime.Now.ToShortDateString());
            _list.Add("1");

            Task.Factory.StartNew(() => mdata.AgendaVencida(_list))
            .ContinueWith(task =>
            {
                if (task.IsCompleted)
                {
                    ListarAgenda = task.Result;
                }
            },
                          System.Threading.CancellationToken.None,
                          TaskContinuationOptions.None,
                          TaskScheduler.FromCurrentSynchronizationContext());
        }