Beispiel #1
0
		private async void btnSend_Click(object sender, RoutedEventArgs e)
		{
            string email = tbEmail.Text;
            string pass = pbPassword.Password;
            string title = tbTitle.Text;
            string content = tbContent.Text;

            if (email != "" && pass != "" && title != "" && content != "")
            {
                GuestMail mail = new GuestMail(email, pass, title, content);
                await MediateClass.UserVM.UserSendMail(mail);
            }
		} 
 public async Task UserSendMail(GuestMail mail)
 {
     JToken body = JToken.FromObject(mail);
     IDictionary<string, string> param = new Dictionary<string, string>
     {
         {"type" , "mail"}
     };
     try
     {
         var result = await App.MobileService.InvokeApiAsync("UserTypes", body, HttpMethod.Post, param);
     }
     catch (Exception ex)
     {
         await new MessageDialog(ex.Message.ToString(), "Notification!").ShowAsync();
     }
 }