- 1
- 2
- 3
- 4
- 5
- 6
- 7
oi.Status = o.Active && o.ByCondition!=Condition.None && o.Time==DateTime.MinValue
? OrderStatusType.Condition :
o.Active
? OrderStatusType.Active
: o.Cancelled
? OrderStatusType.Cancelled
: o.Matched ? OrderStatusType.Matched : OrderStatusType.Unknown;
И кстати, код НЕ из датабиндинга в aspx взят, а из бизнес-логики.