public enum PriceComponent
{
[Display(Name = "1类价格")]
PriceZero,
[Display(Name = "2类价格")]
PriceOne,
[Display(Name = "3类价格")]
PriceTwo,
[Display(Name = "4类价格")]
PriceThree,
[Display(Name = "5类价格")]
PriceFour
}
@foreach(var i in Model.AllPrices.GroupBy(y=>y.PriceComponent))
{
<wt:FieldSet title="@i.key
</wt:FieldSet>
}
这样代码 只能显示枚举的值
使用WTM系统自动的函数显示枚举中文名称
<wt:FieldSet title="@WalkingTec.Mvvm.Core.PropertyHelper.GetEnumDisplayName( typeof(Enum.PriceComponent),i.Key.ToString())">
这里的Enum.PriceComponent改为自己的枚举即可显示中文名字