private async void InitAsync()
        {
            var result = await client.GetAsync <List <customer> >("Get");

            if (result != null)
            {
                foreach (var item in result)
                {
                    Source.Add(item);
                    SourceView.Refresh();
                }
            }

            signalRClient = ResourcesBase.GetSignalClient();
            signalRClient.OnAddCustomer += SignalRClient_OnUpdateCUstomer;
        }
Esempio n. 2
0
        private async void Init()
        {
            Source.Clear();
            var res = await client.GetAsync <List <Agent> >("");

            if (res != null && res.Count > 0)
            {
                foreach (var item in res)
                {
                    Source.Add(item);
                }
            }
            SourceView.Refresh();
            signalRClient             = ResourcesBase.GetSignalClient();
            signalRClient.OnAddAgent += SignalRClient_OnAddAgent;
        }
Esempio n. 3
0
        private async void InitAsync()
        {
            Source.Clear();
            var result = await client.GetAsync <List <city> >("Get");

            if (result != null)
            {
                foreach (var item in result)
                {
                    Source.Add(item);
                    SourceView.Refresh();
                }
            }
            signalRClient            = ResourcesBase.GetSignalClient();
            signalRClient.OnAddCity += SignalRClient_OnAddCity;
            RefreshCompleted?.Invoke();
        }
Esempio n. 4
0
        public async void CompleteTask()
        {
            var result = await client.GetAsync <List <Port> >("");

            if (result != default(List <Port>))
            {
                Source.Clear();
                foreach (var item in result)
                {
                    Source.Add(item);
                }
                SourceView.Refresh();
                RefreshCompleted?.Invoke();
            }

            signalRClient            = ResourcesBase.GetSignalClient();
            signalRClient.OnAddPort += SignalRClient_OnAddPort;
        }
Esempio n. 5
0
        private async void Init()
        {
            using (var client = new Client("agents"))
            {
                var res = await client.GetAsync <List <agent> >("Get");

                if (res != null && res.Count > 0)
                {
                    foreach (var item in res)
                    {
                        Source.Add(item);
                    }
                }
                SourceView.Refresh();
            }
            signalRClient             = ResourcesBase.GetSignalClient();
            signalRClient.OnAddAgent += SignalRClient_OnAddAgent;
        }