示例#1
0
        public async Task LoadAsync(int friendId)
        {
            var tempfreind = await _dataservice.GetByIdAsync(friendId);

            Friend = new Wrapper.FriendWrapper(tempfreind);

            ((DelegateCommand)SaveCommand).RaiseCanExecuteChanged();
        }
        public async Task LoadAsync(int id)
        {
            Friend = new FriendWrapper(await _friendService.GetByIdAsync(id));
            Friend.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(Friend.HasErrors))
                {
                    ((DelegateCommand)SaveCommand).RaiseCanExecuteChanged();
                }
            };

            ((DelegateCommand)SaveCommand).RaiseCanExecuteChanged();
        }
 public async Task LoadAsync(int friendId)
 {
     Friend = await _dataService.GetByIdAsync(friendId);
 }
示例#4
0
        public async Task LoadAsync(int friendId)
        {
            var friend = await _dataService.GetByIdAsync(friendId);

            Friend = new FriendWrapper(friend);
        }
示例#5
0
 public async Task LoadAsync(Guid friendId)
 {
     Friend = await friendDataService.GetByIdAsync(friendId);
 }