Example #1
0
        private async System.Threading.Tasks.Task editInventoryItem(DisplayItem item)
        {
            var editViewModel = new InventoryEditViewModel(_viewModel.OriginalVendors.ToList(), _viewModel.OriginalCategories.ToList(), item.Tag as InventoryItem);

            editViewModel.ItemSaved += (object sender, EventArgs e) =>
            {
                _viewModel.InventoryItemSaved(item.Tag as InventoryItem, item);
            };
            var page = new InventoryEditPage();

            page.BindingContext = editViewModel;
            await((MainPage)App.Current.MainPage).NavigateTo(page, true);
        }
Example #2
0
        protected async void Add_Clicked(object sender, EventArgs e)
        {
            var editViewModel = new InventoryEditViewModel(_viewModel.OriginalVendors.ToList(), _viewModel.OriginalCategories.ToList());

            editViewModel.ItemSaved += (object sender2, EventArgs e2) =>
            {
                _viewModel.InventoryItemSaved(sender2 as InventoryItem, null);
            };
            var page = new InventoryEditPage
            {
                BindingContext = editViewModel
            };

            await((MainPage)App.Current.MainPage).NavigateTo(page, true);
        }