Exemple #1
0
 public static async Task Delete(User user)//删除用户
 {
     IMobileServiceTable<User> userTable = App.MobileService.GetTable<User>();
     await userTable.DeleteAsync(user);
     DeleteAzureStorage(user.UserName);
     
 }
Exemple #2
0
 public static async void Insert(string userid,string username)
 {
     try
     {
         User todoItem = new User() { UserId = userid, UserName = username};
         IMobileServiceTable<User> userTable = App.MobileService.GetTable<User>();
         await userTable.InsertAsync(todoItem);
     }
     catch(Exception e)
     {
         new MessageDialog("用户信息存储失败!" + e.Message).ShowAsync();
     }
     bool x = await UploadToAzureStorage(username);
     if(x)
     {
         await new MessageDialog("登陆成功!").ShowAsync();
     }
     
 }