private async void Authorisation() { await PopupNavigation.PushAsync(new LoadPage(), true); string description = null; int stateAuth = managerVazoo.A_RWork("authorisation", ref description, idCompany, Username, password); await PopupNavigation.PopAllAsync(); if (stateAuth == 3) { CheckAuth.SavingAccount(IdCompany, Username, Password); Application.Current.MainPage = new MenuDetalePage(); } else if (stateAuth == 2) { await PopupNavigation.PushAsync(new Error("Invalid login or password, please try again"), true); } else if (stateAuth == 1) { await PopupNavigation.PushAsync(new Error("No network"), true); } else if (stateAuth == 4) { await PopupNavigation.PushAsync(new Error("Technical works on the server"), true); } }