protected override void InitFromBundle(IMvxBundle bundle)
        {
            // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
            // details here
            // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation
            string id = bundle.Data["id"];

            _books.GetById(id, result => Book = result ,error => { });

            base.InitFromBundle(bundle);
        }
 protected override void InitFromBundle(IMvxBundle parameters)
 {
     // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
     // details here
     // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation
     base.InitFromBundle(parameters);
     if (parameters.Data.ContainsKey("BookId"))
     {
         string id = parameters.Data["BookId"];
         _books.GetBookDetails(id,result => Book = result,error => {});
     }
 }
        protected override void InitFromBundle(IMvxBundle parameters)
        {
            // TODO get and cast incomming bundle to the parameter passed from FirstViewModel
            // details here
            // https://github.com/MvvmCross/MvvmCross/wiki/ViewModel--to-ViewModel-navigation

            base.InitFromBundle(parameters);

            BookId = parameters.Data["id"];
            _books.GetBookItem(BookId,
                result => Result = result,
                error => { });
        }
示例#4
0
 private void Update(string id)
 {
     _books.SelectAsync(id,
         result => Info = result,
         error => { });
 }
 private void showDetails(BookSearchItem item)
 {
     ShowViewModel<DetailsViewModel>(new {id = item.id }); // pass "reference to the book" here
 }