Exemplo n.º 1
0
        private async void UpdateRoleSync()
        {
            await AccountService.UpdatePreferredRole(_Roles.Id);

            // await   AllSyncService.DataAsync();
            await AllSyncService.DataAsync(true);
        }
Exemplo n.º 2
0
 private async void NavigationSync()
 {
     networkAccess = Connectivity.NetworkAccess;
     if (networkAccess == NetworkAccess.Internet)
     {
         await AllSyncService.DataAsync();
     }
     else
     {
         await page.DisplayAlert("Alert", ResponceCode.customErrorFunction(651, null), "Ok");
     }
 }
Exemplo n.º 3
0
        async Task OnSyncAsync()
        {
            try
            {
                await AllSyncService.DataAsync();

                await Application.Current.MainPage.Navigation.PushAsync(new MainPage(true));
            }
            catch (Exception ex)
            {
                Debug.Write(ex.Message);
            }
        }
Exemplo n.º 4
0
        public async Task LogOut()
        {
            try
            {
                AllSyncService.DataPushAsync();
                Client.IsLogged = false;
                Application.Current.Properties["IsUserLoggedIn"] = false;
                await AccountService.Logout();

                await Application.Current.MainPage.Navigation.PushAsync(new LoginPage());
            }
            catch (Exception ex)
            {
                Debug.Write(ex.Message);
            }
        }
Exemplo n.º 5
0
 private static async void DataSync()
 {
     //  await AllSyncService.DataAsync();
     await AllSyncService.DataAsync(true);
 }
Exemplo n.º 6
0
 public async Task ClearedDataAsync()
 {
     Client.IsCleared = true;
     await AllSyncService.OnLogOutAsync();
 }
Exemplo n.º 7
0
 public async void DataSync()
 {
     await AllSyncService.PushDataAsync();
 }