fix namespacing issues
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
@code {
|
@code {
|
||||||
protected override void OnInitialized() {
|
protected override void OnInitialized() {
|
||||||
if (Statics.User.ID == -1 ) {
|
if (Statics.User.ID == -1 ) {
|
||||||
Nav.NavigateTo( "/account/login?ReturnURL=Null" );
|
Nav.NavigateTo( "/account/login" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h3 class="cart-title">Cart</h3>
|
<h3 class="cart-title">Cart</h3>
|
||||||
|
|
||||||
<div class="Spacer">
|
<div class="Spacer">
|
||||||
@foreach( MistoxWebsite.Shared.Cart obj in Statics.Carts ) {
|
@foreach( MistoxWebsite.Shared.Database.Cart obj in Statics.Carts ) {
|
||||||
<div class="cart-item">
|
<div class="cart-item">
|
||||||
<h1>@getItem(obj.ProductID)?.Name</h1>
|
<h1>@getItem(obj.ProductID)?.Name</h1>
|
||||||
@foreach( string cur in getItem( obj.ProductID )?.Images ) {
|
@foreach( string cur in getItem( obj.ProductID )?.Images ) {
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
protected override void OnInitialized() {
|
protected override void OnInitialized() {
|
||||||
total = 0;
|
total = 0;
|
||||||
foreach( MistoxWebsite.Shared.Cart obj in Statics.Carts ) {
|
foreach( MistoxWebsite.Shared.Database.Cart obj in Statics.Carts ) {
|
||||||
foreach( Product item in Statics.Products ) {
|
foreach( Product item in Statics.Products ) {
|
||||||
if( obj.ProductID == item.ID ) {
|
if( obj.ProductID == item.ID ) {
|
||||||
total = total + (item.Cost / 100f);
|
total = total + (item.Cost / 100f);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
public bool isOwned(int ID ) {
|
public bool isOwned(int ID ) {
|
||||||
if(Statics.Owned.Count > 0 ) {
|
if(Statics.Owned.Count > 0 ) {
|
||||||
foreach( MistoxWebsite.Shared.Receipt cur in Statics.Owned ) {
|
foreach( MistoxWebsite.Shared.Database.Receipt cur in Statics.Owned ) {
|
||||||
if( cur.ProductID == ID ) {
|
if( cur.ProductID == ID ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool isInCart(int id) {
|
public bool isInCart(int id) {
|
||||||
foreach( MistoxWebsite.Shared.Cart cur in Statics.Carts ) {
|
foreach( MistoxWebsite.Shared.Database.Cart cur in Statics.Carts ) {
|
||||||
if (cur.ProductID == id ) {
|
if (cur.ProductID == id ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async void onAddToCart( int ID ) {
|
public async void onAddToCart( int ID ) {
|
||||||
MistoxWebsite.Shared.Cart item = new MistoxWebsite.Shared.Cart {
|
MistoxWebsite.Shared.Database.Cart item = new MistoxWebsite.Shared.Database.Cart {
|
||||||
ProductID = ID,
|
ProductID = ID,
|
||||||
AccountID = Statics.User.ID
|
AccountID = Statics.User.ID
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user