private void LoginProcess() { JobPoolAPI api = null; ResponseModel usermodel = null; Device.BeginInvokeOnMainThread(async() => { try { btnLogin.IsEnabled = false; api = new JobPoolAPI(); Loader.IsVisible = true; Loader.IsRunning = true; usermodel = api.postLogin(txtFName.Text, txtPass.Text); if (usermodel.SUCCESS == "1") { StaticMethods.SaveLocalData(usermodel); await PopupNavigation.PushAsync(new Successfully(usermodel.MESSAGE)); } Loader.IsVisible = false; Loader.IsRunning = false; btnLogin.IsEnabled = true; } catch { ShowMessage("Failed to Authenticate user login", Color.Red); } }); }
public void SaveData() { string Email, Password; Email = Convert.ToString(txtFName.Text); Password = Convert.ToString(txtPass.Text); api.postLogin(Email, Password); }