@model GreenTree.Nachtragsmanagement.Web.Models.Deviation.IRequireKindDataModel

@{ 
	var comboBoxSettingsAction = (Action<ComboBoxSettings>)Session[ViewData["KindsComboBoxSettings"].ToString()];
	var kindValue = (Model == null || (Model != null && Model.KindId == -1) || (Model != null && !Model.KindId.HasValue))
		? Convert.ToInt32(ViewData["DefaultKind"])
		: Model.KindId;
}

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