Exemple #1
0
        private async void b_login_Click(object sender, RoutedEventArgs e)
        {
            LoginViewModel login = new LoginViewModel {
                Login = "******", Senha = "adm123*"
            };
            WSService ws     = new WSService();
            var       result = await ws.Login(login);

            if (result.GetType() == typeof(Response))
            {
                var           response = ((Response)result);
                MessageDialog msg      = new MessageDialog(response.Data.ToString());
                await msg.ShowAsync();

                return;
            }
            MessageDialog msgOk = new MessageDialog("Ok");
            await msgOk.ShowAsync();
        }