コード例 #1
0
        protected override void Edit()
        {
            UserDTO             selectedDto     = Service.GetUserById(SelectedItem.Id);
            UserDetailViewModel detailModelView = new UserDetailViewModel(selectedDto, false);

            if (NavigationService.NavigateTo("Detail", detailModelView) == NavigationResult.Ok)
            {
                Load();
                SelectedItem = Items.SingleOrDefault(dto => dto.Id == selectedDto.Id);
            }
        }
コード例 #2
0
        protected override void New()
        {
            UserDTO             newUser         = new UserDTO();
            UserDetailViewModel detailModelView = new UserDetailViewModel(newUser, true);

            if (NavigationService.NavigateTo("Detail", detailModelView) == NavigationResult.Ok)
            {
                Load();
                SelectedItem = Items.SingleOrDefault(dto => dto.Id == newUser.Id);
            }
        }