protected void DoTransfer_Click(object sender, EventArgs e) { try { Int64 amount = 0; if (Int64.TryParse(AmountToTransfer.Text, out amount)) { Int64 FromAcctNumber = Convert.ToInt64(FromAccount.SelectedValue); Int64 ToAcctNumber = Convert.ToInt64(ToAccount.Text); if (AccountMgmt.GetBalance(FromAcctNumber) - amount >= 0) { Response.Redirect(string.Format("DoTransfer.aspx?ToAccount={0}&FromAccount={1}&Amount={2}", ToAcctNumber, FromAcctNumber, amount)); } else { message.Text = "Please verify the source account has enough money to cover this transfer"; } } else { message.Text = "Please make sure the amount entered in the Amount text box only numeric values (0-9)"; } } catch (Exception ex) { ErrorLogging.AddException("Error in Transfer", ex); message.Text = ex.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { if (null != Request.Cookies[Settings.Default.SessionCookieKey]) { Int64 userID = UserMgmt.LookupSession(Request.Cookies[Settings.Default.SessionCookieKey].Value); if (0 == userID) { Response.Redirect("Account/Login.aspx?ReturnUrl=/Forum.aspx"); } else { FromAccount.Items.Clear(); FromAccount.Items.AddRange(AccountMgmt.GetAccountList(userID)); } } } catch (ThreadAbortException tae) { //nothing } catch (Exception ex) { ErrorLogging.AddException("Error in " + Path.GetFileName(Request.PhysicalPath), ex); message.Visible = true; message.Text = ex.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { try { if (null != Request.Cookies[Settings.Default.SessionCookieKey]) { Int64 userID = UserMgmt.LookupSession(Request.Cookies[Settings.Default.SessionCookieKey].Value); if (0 == userID) { Response.Redirect("Account/Login.aspx?ReturnUrl=Forum.aspx"); } else { Accounts.DataSource = AccountMgmt.GetAccounts(userID); Accounts.DataBind(); } } } catch (Exception ex) { ErrorLogging.AddException("Error in " + Path.GetFileName(Request.PhysicalPath), ex); message.Visible = true; message.Text = ex.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { try { AccountMgmt.Transfer(Convert.ToInt64(Request.Params["FromAccount"]), Convert.ToInt64(Request.Params["ToAccount"]), Convert.ToInt64(Request.Params["Amount"])); Response.Redirect("ActionDone.aspx?Title=Transfer Success&Text=Your transfer was successful. If you moved funds within SuperSecure Bank accounts your funds are immediately available."); } catch (ThreadAbortException tae) { logger.error("Error in " + Path.GetFileName(Request.PhysicalPath), ex); }
protected void Submit_Click(object sender, EventArgs e) { try{ AccountMgmt.CreateAccount(UserMgmt.LookupSession(Request.Cookies[Settings.Default.SessionCookieKey].Value), AccountType.SelectedValue, StartingBalance.Value, AccountLevel.SelectedValue, 1); Response.Redirect(string.Format(@"ActionDone.aspx?Title=Application Completed&Text=Thank you for applying for a new {0} account with SuperSecure Bank, your applicaiton will be reviewed and a banker will be with you shortly. At any time you can check on the status of your account by going to the <a href=""ViewAccount.aspx"">View Accounts Page</a>", AccountType.SelectedItem)); } catch (Exception ex) { ErrorLogging.AddException("Error in " + Path.GetFileName(Request.PhysicalPath), ex); message.Visible = true; message.Text = ex.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { try { AccountMgmt.Transfer(Convert.ToInt64(Request.Params["FromAccount"]), Convert.ToInt64(Request.Params["ToAccount"]), Convert.ToInt64(Request.Params["Amount"])); Response.Redirect("ActionDone.aspx?Title=Transfer Success&Text=Your transfer was successful. If you moved funds within SuperSecure Bank accounts your funds are immediately available."); } catch (ThreadAbortException tae) { //nothing } catch (Exception ex) { ErrorLogging.AddException("Error in " + Path.GetFileName(Request.PhysicalPath), ex); Response.Redirect("ActionDone.aspx?Title=Transfer Failed&Text=We're sorry, but there was an error transferring your funds. Please try again at a later date or call support at: 1-800-555-1212"); } }