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.

40 lines
1.9 KiB

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>("الزامی", "4"), new Tuple<string, string>("خیلی مهم", "3"), new Tuple<string, string>("مفید", "2") }; }
  5. <div class="form-group">
  6. <div class="row">
  7. <div class="col-md-3 pull-right">
  8. @Html.Label(Model.ParameterName)
  9. @if (!string.IsNullOrWhiteSpace(Model.CommentAvalin)) {
  10. <span class="glyphicon glyphicon-exclamation-sign form-help" data-toggle="tooltip" data-for="@paramId" data-placement="top" title="@Model.CommentAvalin"></span>
  11. }
  12. </div>
  13. <div class="col-md-4 pull-right">
  14. @switch (Model.DisplayMethod)
  15. {
  16. case 1:
  17. @Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
  18. break;
  19. case 2:
  20. @Html.TextArea(paramId)
  21. break;
  22. case 3:
  23. /* validator bezar baraye numeric gereftan */
  24. @Html.TextBox(paramId, string.Empty, new { @class = "form-control" })
  25. break;
  26. case 4:
  27. @Html.DropDownList(paramId, new SelectList(Model.ParameterValues, "item1", "item2"), "انتخاب کنید ...", new { @class = "form-control" })
  28. break;
  29. default:
  30. @MvcHtmlString.Empty
  31. break;
  32. }
  33. </div>
  34. <div class="col-md-3 pull-right">
  35. @if (Model.HasMoscow)
  36. {
  37. @Html.DropDownList(muscowId, new SelectList(MuSCoWList, "item2", "item1", "2"), new { @class = "form-control" })
  38. }
  39. </div>
  40. </div>
  41. </div>