- 根据Session获取当前登陆用户
var sessionManager = CompositionManager.GetValue
();var session = sessionManager.GetSession();var user = session.GetUser(); - 绑定枚举数据类型定义属性
[Display(ResourceType = typeof(Resources), Name = "ArticleStates")] public string State { get; set; }
获取值
this.State = ((int)article.State).ToString();
设置值
article.State = this.State.ConvertOrDefault
(); 页面上面获取值
@FormHelper.RadioButtonGroup(a => a.State, SelectListItems.FromEnum
())