@model GreenTree.Nachtragsmanagement.Web.Models.Admin.User.IRequireRoleDataModel

@{ 
	var comboBoxSettingsAction = (Action<ComboBoxSettings>)Session[ViewData["RolesComboBoxSettings"].ToString()];
}

@if (Model == null)
{
	Html.DevExpress().ComboBox(comboBoxSettingsAction)
		.BindList(ViewData["AllRoles"]).GetHtml();
}
else
{
	Html.DevExpress().ComboBoxFor(m => m.RoleId, comboBoxSettingsAction)
		.BindList(ViewData["AllRoles"]).Bind(Model.RoleId).GetHtml();
}