private async void InsertCurrentUser() { customers cust = new customers { name = LiveUserInfo.Name, userId = LiveUserInfo.Id, createdAt = DateTime.Now.ToUniversalTime(), updatedAt = DateTime.Now.ToUniversalTime(), userImage = LiveUserInfo.pic,//"http://azmob.blob.core.windows.net/images/" + LiveUserInfo.Name.Replace(' ', '_').ToLower() + ".jpg", channeluri = LiveUserInfo.channelUri }; await App.MobileService.GetTable<customers>().InsertAsync(cust); this.Frame.Navigate(typeof(WhereTheFriend.Welcome)); }
private async void UpdateCurrentUser(List<customers> list) { customers cust = new customers { id = Convert.ToInt32(list[0].id), name = list[0].name, userId = list[0].userId, createdAt = list[0].createdAt, updatedAt = DateTime.Now.ToUniversalTime(), userImage = list[0].userImage, channeluri = LiveUserInfo.channelUri }; if (cust.userImage == null) cust.userImage = LiveUserInfo.pic;// "http://azmob.blob.core.windows.net/images/" + cust.name.Replace(' ', '_').ToLower() + ".jpg"; await App.MobileService.GetTable<customers>().UpdateAsync(cust); }