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

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

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