private async void btnShareMessage_Click_1(object sender, RoutedEventArgs e) { checkins ch = new checkins { message = txtShareMessage.Text.Trim(), userId = LiveUserInfo.Id, username = LiveUserInfo.Name, createdAt = DateTime.Now.ToUniversalTime(), userImage = LiveUserInfo.pic//"http://azmob.blob.core.windows.net/images/" + LiveUserInfo.Name.Replace(' ', '_').ToLower() + ".jpg" }; await App.MobileService.GetTable<checkins>().InsertAsync(ch); //Load the page this.Frame.Navigate(typeof(WhereTheFriend.Welcome)); }
private async void DeleteMessage() { List<object> lists = new List<object>(); lists = lvListMessage.SelectedItems.ToList(); if (lists.Count > 0) { foreach (dynamic list in lists) { checkins checkin = new checkins { id = list.id, message = list.message, userId = list.userId, username = list.username, createdAt = list.createdAt, userImage = list.userImage }; await App.MobileService.GetTable<checkins>().DeleteAsync(checkin); } } else await new Windows.UI.Popups.MessageDialog("Select message from the list and click on the delete button.").ShowAsync(); }