You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.2 KiB

11 years ago
11 years ago
11 years ago
11 years ago
  1. @model Sevomin.Models.JobParameterViewModel
  2. @{ string paramId = string.Format("value-{0}", Model.ParameterId.ToString());
  3. string muscowId = string.Format("muscow-{0}", Model.ParameterId.ToString()); }
  4. @Html.Label(Model.ParameterName)
  5. <div class="form-group">
  6. @switch (Model.DisplayMethod)
  7. {
  8. case 1:
  9. @Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
  10. break;
  11. case 2:
  12. @Html.TextArea(paramId)
  13. break;
  14. case 3:
  15. /* validator bezar baraye numeric gereftan */
  16. @Html.TextBox(paramId)
  17. break;
  18. case 4:
  19. @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), new { @class = "form-control" })
  20. break;
  21. default:
  22. @MvcHtmlString.Empty
  23. break;
  24. }
  25. @if (Model.HasMoscow)
  26. {
  27. @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" })
  28. }
  29. </div>