private bool continuePermit(PrimaryAccountMap map) { if (ddlBuySell.SelectedValue.ToString() == "Buy") { if (map.accountBalance >= (decimal.Parse(txtOffer.Text) * decimal.Parse(txtQuantity.Text))) { return(true); } } else if (ddlBuySell.SelectedValue.ToString() == "Sell") { decimal coinCount = new decimal(); if (ddlCoinType.SelectedValue.ToString() == "Bitcoin") { coinCount = func.getValueByBankValue(map.coinBankVal1); } else if (ddlCoinType.SelectedValue.ToString() == "Litecoin") { coinCount = func.getValueByBankValue(map.coinBankVal2); } if (coinCount >= decimal.Parse(txtQuantity.Text)) { return(true); } } return(false); }
protected void btnRegister_onclick(object sender, EventArgs e) { RepoMapConnect RMC = new RepoMapConnect(databaseTable.PrimaryAccount); PrimaryAccountMap map = new PrimaryAccountMap(true); if (txtPass.Text == txtPass2.Text && txtUsername.Text != "Divinityfound") { map.email = txtEmail.Text; map.username = txtUsername.Text; map.password = RMC.func.hashedValue(txtPass.Text + map.salt); RMC.map = map; RMC.repo.executeData(RMC.map, sqlStatementType.Insert); RMC.func.sendemail("*****@*****.**", map.email, "Coins Share || Account Created", string.Format(@"Welcome {0},<br /><br /> Your account has been created.<br /> <br /> Username: {0}<br /> Password: {1}<br /> <br /> Your account currently is unverified. In order to verify your account, you must make a deposit in Bitcoins, Litecoins, or Credit Card.<br /> <br /> Any amount of bitcoins, litecoins will do. A minimum of $5.00 USD must be deposited to be verified.<br /> <br /> If you did not create this account, simply ignore this email.<br /> <br /> Thank you for joining us.<br /> <br /> - Coins Share Team", map.username, txtPass.Text)); lblError.Text = "Account created. Login anytime."; } else { lblError.Text = "Passwords do not match. Please try again."; } }
protected void btnRegister_onclick(object sender, EventArgs e) { RepoMapConnect RMC = new RepoMapConnect(databaseTable.PrimaryAccount); PrimaryAccountMap map = new PrimaryAccountMap(true); if (txtPass.Text == txtPass2.Text && txtUsername.Text != "Divinityfound") { map.email = txtEmail.Text; map.username = txtUsername.Text; map.password = RMC.func.hashedValue(txtPass.Text + map.salt); RMC.map = map; RMC.repo.executeData(RMC.map, sqlStatementType.Insert); RMC.func.sendemail("*****@*****.**", map.email, "Coins Share || Account Created", string.Format(@"Welcome {0},<br /><br /> Your account has been created.<br /> <br /> Username: {0}<br /> Password: {1}<br /> <br /> Your account currently is unverified. In order to verify your account, you must make a deposit in Bitcoins, Litecoins, or Credit Card.<br /> <br /> Any amount of bitcoins, litecoins will do. A minimum of $5.00 USD must be deposited to be verified.<br /> <br /> If you did not create this account, simply ignore this email.<br /> <br /> Thank you for joining us.<br /> <br /> - Coins Share Team", map.username, txtPass.Text)); lblError.Text = "Account created. Login anytime."; } else { lblError.Text = "Passwords do not match. Please try again."; } }
protected void btnLogin_onclick(object sender, EventArgs e) { RepoMapConnect RMCaccount = new RepoMapConnect(databaseTable.PrimaryAccount); PrimaryAccountMap PAM = new PrimaryAccountMap(); PAM.username = txtUsername.Text; RMCaccount.map = RMCaccount.repo.selectData(PAM); if (RMCaccount.map.password == RMCaccount.func.hashedValue(txtPassword.Text + RMCaccount.map.salt)) { SessionsMap map = new SessionsMap(RMCaccount.map.id); SessionsRepository repo = new SessionsRepository(); repo.executeData(map, sqlStatementType.Insert); HttpCookie cookie = RMCaccount.func.createcookie(map.sessionVal, "SessionCookie"); Response.Cookies.Add(cookie); Response.Redirect("Account/view.aspx"); } }
protected void btnLogin_onclick(object sender, EventArgs e) { RepoMapConnect RMCaccount = new RepoMapConnect(databaseTable.PrimaryAccount); PrimaryAccountMap PAM = new PrimaryAccountMap(); PAM.username = txtUsername.Text; RMCaccount.map = RMCaccount.repo.selectData(PAM); if (RMCaccount.map.password == RMCaccount.func.hashedValue(txtPassword.Text + RMCaccount.map.salt)) { SessionsMap map = new SessionsMap(RMCaccount.map.id); SessionsRepository repo = new SessionsRepository(); repo.executeData(map, sqlStatementType.Insert); HttpCookie cookie = RMCaccount.func.createcookie(map.sessionVal, "SessionCookie"); Response.Cookies.Add(cookie); Response.Redirect("Account/view.aspx"); } }
private bool continuePermit(PrimaryAccountMap map) { if (ddlBuySell.SelectedValue.ToString() == "Buy") { if (map.accountBalance >= (decimal.Parse(txtOffer.Text) * decimal.Parse(txtQuantity.Text))) { return true; } } else if (ddlBuySell.SelectedValue.ToString() == "Sell") { decimal coinCount = new decimal(); if (ddlCoinType.SelectedValue.ToString() == "Bitcoin") { coinCount = func.getValueByBankValue(map.coinBankVal1); } else if (ddlCoinType.SelectedValue.ToString() == "Litecoin") { coinCount = func.getValueByBankValue(map.coinBankVal2); } if (coinCount >= decimal.Parse(txtQuantity.Text)) { return true; } } return false; }