|
@@ -32,7 +32,7 @@ namespace comal.timesheets
|
|
|
loadFromIOSLink = logindetails;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
protected override void OnAppearing()
|
|
|
{
|
|
@@ -78,14 +78,14 @@ namespace comal.timesheets
|
|
|
Thread.Sleep(250);
|
|
|
Device.BeginInvokeOnMainThread(() =>
|
|
|
{
|
|
|
- if (App.IsUserLoggedIn && GlobalVariables.ChangeUser == false)
|
|
|
- {
|
|
|
- LaunchMainPage();
|
|
|
- return;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (String.IsNullOrWhiteSpace(App.Settings.UserID) || String.IsNullOrWhiteSpace(App.Settings.Password))
|
|
|
+ if (App.IsUserLoggedIn && GlobalVariables.ChangeUser == false)
|
|
|
+ {
|
|
|
+ LaunchMainPage();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (String.IsNullOrWhiteSpace(App.Settings.UserID) || String.IsNullOrWhiteSpace(App.Settings.Password))
|
|
|
{
|
|
|
DisplayAlert("Unable to log in", "User ID or password is blank", "OK");
|
|
|
ShowPINPad();
|
|
@@ -158,7 +158,22 @@ namespace comal.timesheets
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- DisplayAlert("Connection Error", ex.Message, "OK");
|
|
|
+ string chosenOption = await DisplayActionSheet("Connection error - please check your connection. Try again?", "Cancel", null, "Yes");
|
|
|
+ switch (chosenOption)
|
|
|
+ {
|
|
|
+ case "Yes":
|
|
|
+ Task.Run(() =>
|
|
|
+ {
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ Device.BeginInvokeOnMainThread(() =>
|
|
|
+ {
|
|
|
+ RunValidate();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -168,7 +183,7 @@ namespace comal.timesheets
|
|
|
App.Current.Properties.Add("SessionID", ClientFactory.SessionID);
|
|
|
else
|
|
|
App.Current.Properties["SessionID"] = ClientFactory.SessionID;
|
|
|
- if(timerRunning)
|
|
|
+ if (timerRunning)
|
|
|
timer.Dispose();
|
|
|
App.Data.Refresh(true);
|
|
|
Device.BeginInvokeOnMainThread(async () => { await Navigation.PushAsync(new MainPage()); });
|