|
@model Sevomin.Models.JobParameterViewModel
|
|
@{ string paramId = string.Format("value-", Model.ParameterId.ToString());
|
|
string muscowId = string.Format("muscow-", Model.ParameterId.ToString()); }
|
|
@Html.Label(Model.ParameterName)
|
|
<div class="form-group">
|
|
@switch (Model.DisplayMethod)
|
|
{
|
|
case 1:
|
|
@Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
|
|
break;
|
|
case 2:
|
|
@Html.TextArea(paramId)
|
|
break;
|
|
case 3:
|
|
/* validator bezar baraye numeric gereftan */
|
|
@Html.TextBox(paramId)
|
|
break;
|
|
case 4:
|
|
@Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), new { @class = "form-control" })
|
|
break;
|
|
default:
|
|
@MvcHtmlString.Empty
|
|
break;
|
|
}
|
|
@if (Model.HasMoscow)
|
|
{
|
|
@Html.DropDownList(muscowId, new SelectList(new List<SelectListItem>() { new SelectListItem{ Value = "4", Text = "Must"}, new SelectListItem{ Value = "3", Text = "Should"}, new SelectListItem{ Value = "2", Text = "Could"}, new SelectListItem{ Value = "1", Text = "Wont"}}), new { @class = "form-control" })
|
|
}
|
|
</div>
|