Пример #1
0
        public async void btnNewBankAccount_Clicked(object sender, EventArgs e)
        {
            var action = await DisplayActionSheet("New Account Type", "Cancel", null, "Checking", "Savings");

            switch (action)
            {
            case "Checking":
                await vm.AddCheckingAccountAsync();

                //CheckingAccountEditTabs checkingEditor = new CheckingAccountEditTabs();
                //checkingEditor.BindingContext = vm.SelectedBankAccount;
                //await Navigation.PushModalAsync(checkingEditor);
                CheckingAccountEdit checkingEditor = new CheckingAccountEdit();
                checkingEditor.BindingContext = vm.SelectedBankAccount;
                await Navigation.PushAsync(checkingEditor);

                break;

            case "Savings":
                await vm.AddsavingsAccountAsync();

                //SavingsAccountEditTabs savingsEditor = new SavingsAccountEditTabs();
                //savingsEditor.BindingContext = vm.SelectedBankAccount;
                //await Navigation.PushModalAsync(savingsEditor);
                SavingsAccountEdit savingsEditor = new SavingsAccountEdit();
                savingsEditor.BindingContext = vm.SelectedBankAccount;
                await Navigation.PushAsync(savingsEditor);

                break;
            }
        }
Пример #2
0
        protected async void OnAccountEditTapped(object sender, TappedEventArgs e)
        {
            SavingsAccountEdit editor = new SavingsAccountEdit();

            editor.BindingContext = vm;
            await Navigation.PushAsync(editor);
        }
Пример #3
0
        protected async void OnItemEdit(object sender, EventArgs e)
        {
            var btn = sender as MenuItem;

            vm.SelectedBankAccount = btn.BindingContext as BankAccountViewModel;
            if (vm.SelectedBankAccount.AccountType == BankAccountType.Checking)
            {
                //CheckingAccountEditTabs editor = new CheckingAccountEditTabs();
                //editor.BindingContext = btn.BindingContext;
                //await Navigation.PushModalAsync(editor);
                CheckingAccountEdit editor = new CheckingAccountEdit();
                editor.BindingContext = btn.BindingContext;
                await Navigation.PushAsync(editor);
            }
            else
            {
                //SavingsAccountEditTabs editor = new SavingsAccountEditTabs();
                //editor.BindingContext = btn.BindingContext;
                //await Navigation.PushModalAsync(editor);
                SavingsAccountEdit editor = new SavingsAccountEdit();
                editor.BindingContext = btn.BindingContext;
                await Navigation.PushAsync(editor);
            }
        }