@model Sevomin.Models.JobParameterViewModel @{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString()); string muscowId = string.Format("moscow-{0}", Model.ParameterId.ToString()); var MuSCoWList = new List>() { new Tuple("الزامی", "4"), new Tuple("خیلی مهم", "3"), new Tuple("مفید", "2") }; }
@Html.Label(Model.ParameterName) @if (!string.IsNullOrWhiteSpace(Model.CommentAvalin)) { }
@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, string.Empty, new { @class = "form-control" }) 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(MuSCoWList, "item2", "item1", "2"), new { @class = "form-control" }) }