react-version #1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user