コード例 #1
0
 async Task<bool> _CheckIsDeleteted(UserAccountViewModel userAccountViewModel)
 {
     if (userAccountViewModel.IsDeleted)
     {
         _userCollection.Remove(userAccountViewModel);
         _userService.Delete(userAccountViewModel.ID);
         return true;
     }
     return false;
 }
コード例 #2
0
 async Task _UpdateIsEdittableStatus(UserAccountViewModel userAccountViewModel)
 {
     await TaskEx.Run(
         () =>
             {
                 if (userAccountViewModel.IsEdittable)
                 {
                     this._userCollection.Where(u => u.ID != userAccountViewModel.ID)
                         .Each(user => user.IsEdittable = false);
                 }
             });
 }
コード例 #3
0
        async Task _Save(UserAccountViewModel userAccountViewModel)
        {
            await TaskEx.Run(
                () =>
                    {
                        var userAccount = new UserAccount(
                            userAccountViewModel.ID,
                            userAccountViewModel.FirstName,
                            userAccountViewModel.LastName,
                            userAccountViewModel.SelectedAccessLevel);

                        this._userService.SaveOrUpdate(userAccount);
                    });
        }