@if (Session == null){
LOGIN
@loginError
}else{
Account
UserName: @Session.UserName
@foreach(PurchasedStock cur in Session.TrackedStocks){
@cur.Symbol
@cur.Quantity
@cur.PurchasePrice
@cur.PurchaseDate.ToString("M-dd-yyyy")
}
}
@if (Session != null){
Current Signal
@foreach (PurchasedStock cur in Session.TrackedStocks){
->
@if (cur.PredictedMovement == -1){
} else if (cur.PredictedMovement == 1){
} else{
}
}
}
@code {
/////////////////////////////////////////////////////////////////////////////////////////////
/// Code Region
/////////////////////////////////////////////////////////////////////////////////////////////
loginSession? Session = null;
// On Page Load
string PaymentKey = "";
protected override async Task OnInitializedAsync(){
(bool, string) result = PaymentProcessor.CreatePayment();
if (!result.Item1){
resultError = result.Item2;
}
PaymentKey = result.Item2;
}
// Login Stuff
string userName = "";
string passWord = "";
string loginError = "";
async Task LoginSession(){
string dbPrefix = $"[{userName.ToLower()}]:"; // Set the DB prefix for the get and set
string passwordhash = dbDriver.Get( dbPrefix + "password" ); // Pull the password hash
if (BCrypt.Verify( passWord, passwordhash )){ // If the password is valid
List