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.

29 lines
1.2 KiB

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