moneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoney

This commit is contained in:
MarcEricMartel 2022-10-18 12:15:57 -07:00
parent 98a29cfb33
commit 93f358f990

View File

@ -62,10 +62,10 @@ public class InventoryController : Controller {
switch (order) {
case "Price":
ret = ret.OrderBy(x => x.Status == Product.States.Promotion? x.PromoPrice: x.Price);
ret = ret.OrderBy(x => x.Status == Product.States.Promotion || x.Status == Product.States.Clearance? x.PromoPrice: x.Price);
break;
case "PriceDesc":
ret = ret.OrderByDescending(x => x.Status == Product.States.Promotion ? x.PromoPrice : x.Price);
ret = ret.OrderByDescending(x => x.Status == Product.States.Promotion || x.Status == Product.States.Clearance ? x.PromoPrice : x.Price);
break;
case "Title":
ret = ret.OrderBy(x => x.Title);