protected void Page_Load(object sender, EventArgs e) { var ident = User.Identity as FormsIdentity; if (!User.Identity.IsAuthenticated || ident == null || ident.Ticket.UserData == null) { FormsAuthentication.RedirectToLoginPage(); } else { mSessionToken = ident.Ticket.UserData; var result = mService.getAccount(mSessionToken, Request.QueryString["bankNumber"]); if (result._checkResult()) { mAccount = result.Account; bankNumber.Text = mAccount.Number; balances.Text = mAccount.Balances.ToString(); var result2 = mService.transactionList(mSessionToken, mAccount.Number); if (result2._checkResult()) { lvTransaction.DataSource = result2.Transactions; lvTransaction.DataBind(); } } } }
protected void btnGetInfo_Click(object sender, EventArgs e) { var result = mService.getAccount(mSessionToken, transferTo.Text); if (result._checkResult()) { mTransfee = result.Account; if (result.User != null) { transfeeName.Text = result.User.Username; btnTransfer.Enabled = true; } } }