private async void Button_Click(object sender, RoutedEventArgs e) { if (this.textTonameInfo.Text == "" || this.textToaccountInfo.Text == "" || this.textMoneyInfo.Text == "") { rootPage.ShowMessage("Please fill out the information"); return; } TransferInfoData data = new TransferInfoData(); data.payAccount = this.activeAccount.accountNO; data.receiveAccount = this.textToaccountInfo.Text; data.receiveAccountName = this.textTonameInfo.Text; data.payMoney = this.textMoneyInfo.Text; LoginHelp loginHelp = new LoginHelp(this.activeAccount); if (this.activeAccount.UsesPassport) { bool rev = await loginHelp.SignInPassport(); if (rev) { this.Frame.Navigate(typeof(TransferInfo),data); this.clearInfo(); } } else { bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name); if (rev) { this.Frame.Navigate(typeof(TransferInfo), data); this.clearInfo(); } } }
protected override void OnNavigatedTo(NavigationEventArgs e) { rootPage = MainPage.Current; base.OnNavigatedTo(e); this.activeAccount = (TransferInfoData)e.Parameter; this.textAccountLabelInfo.Text = this.activeAccount.payAccount; this.textTonameInfo.Text = this.activeAccount.receiveAccountName; this.textToaccountInfo.Text = this.activeAccount.receiveAccount; this.textMoneyInfo.Text = this.activeAccount.payMoney; }
private async void Button_Click(object sender, RoutedEventArgs e) { if (this.textTonameInfo.Text == "" || this.textToaccountInfo.Text == "" || this.textMoneyInfo.Text == "") { rootPage.ShowMessage("Please fill out the information"); return; } TransferInfoData data = new TransferInfoData(); data.payAccount = this.activeAccount.accountNO; data.receiveAccount = this.textToaccountInfo.Text; data.receiveAccountName = this.textTonameInfo.Text; data.payMoney = this.textMoneyInfo.Text; LoginHelp loginHelp = new LoginHelp(this.activeAccount); if (this.activeAccount.UsesPassport) { bool rev = await loginHelp.SignInPassport(); if (rev) { this.Frame.Navigate(typeof(TransferInfo), data); this.clearInfo(); } } else { bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name); if (rev) { this.Frame.Navigate(typeof(TransferInfo), data); this.clearInfo(); } } }