Exemplo n.º 1
0
        async void cdValToken()
        {
            try {
                cdCallAPI mycallAPI = new cdCallAPI();
                var       resp      = await mycallAPI.cdvalidateToken();

                String stresp = (String)resp;
                if (stresp.Contains("Success"))
                {
                    System.Diagnostics.Debug.WriteLine(" Valid Login");
                }
                else
                {
                    System.Diagnostics.Debug.WriteLine(" Login invalid. Navigating to main page " + stresp);
                    var tpage = new MainPage();
                    await Navigation.PushModalAsync(tpage);
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(" In error " + ex);
            }
        }