//将int转换为枚举
(ProductStat)Convert.ToInt32(state);
//将枚举转换为int
<%#Convert .ToInt32 (Eval("State"))%>
//将object 转换为枚举
(OrderState)objState;