Edit.cshtml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationSetting.EvaluationTypeView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. var isDisable = Request["type"] == "detail" ? false : (Request["type"] == "edit" ? false : true);
  8. }
  9. @section scripts{
  10. <script src="~/Scripts/Business/EvaluationManage/EvaluationSetting/EvaluationTypeEdit.js" type="text/javascript"></script>
  11. <script type="text/javascript">
  12. var nonSelect = "@DropdownList.SELECT_ALL";
  13. </script>
  14. }
  15. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  16. @using (Ajax.BeginForm(new AjaxOptions
  17. {
  18. OnSuccess = "EMISFunction.FormSuccess",
  19. OnBegin = "EMISFunction.FormSubmit",
  20. OnComplete = "EMISFunction.FormComplete" }))
  21. {
  22. <div class="p_title">
  23. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  24. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  25. @if (Request["type"] != "detail")
  26. {
  27. @Html.ContextMenuBar("Edit")
  28. }
  29. </div>
  30. </div>
  31. <div class="search_list">
  32. @Html.HiddenFor(x => x.EvaluationTypeID)
  33. <table cellpadding="0" cellspacing="0" id="collegePrioritytable">
  34. <tr>
  35. <td>
  36. @Html.LabelFor(x => x.Name):
  37. </td>
  38. <td colspan="3">
  39. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:65%;" } })
  40. </td>
  41. </tr>
  42. <tr>
  43. <td style="color:red;">
  44. @Html.LabelFor(x => x.IsStudent):
  45. </td>
  46. <td>
  47. @if (!isEnable)
  48. {
  49. @Html.CheckBoxFor(x => x.IsStudent, new Dictionary<string, object>() { { "disabled", isEnable } })
  50. }
  51. else
  52. {
  53. @Html.CheckBoxFor(x => x.IsStudent)
  54. }
  55. </td>
  56. <td style="color:red;">
  57. @Html.LabelFor(x => x.Number):
  58. </td>
  59. <td>
  60. @Html.TextBoxFor(x => x.Number, new TextBoxOptions { IsEnabled = isEnable })
  61. </td>
  62. </tr>
  63. <tr>
  64. <td>
  65. @Html.LabelFor(x => x.StartTime):
  66. </td>
  67. <td>
  68. @Html.TextBoxFor(x => x.StartTime, new TextBoxOptions
  69. {
  70. TextBoxType = TextBoxType.DateTime,
  71. IsEnabled = isEnable
  72. })
  73. </td>
  74. <td>
  75. @Html.LabelFor(x => x.EndTime):
  76. </td>
  77. <td>
  78. @Html.TextBoxFor(x => x.EndTime, new TextBoxOptions
  79. {
  80. TextBoxType = TextBoxType.DateTime,
  81. IsEnabled = isEnable
  82. })
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>
  87. @Html.LabelFor(x => x.Remark):
  88. </td>
  89. <td colspan="3">
  90. @if (!isEnable)
  91. {
  92. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  93. {
  94. { "style", "width: 90%;min-height: 20px" },
  95. { "disabled", "true" }
  96. })
  97. }
  98. else
  99. {
  100. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 20px" } })
  101. }
  102. </td>
  103. </tr>
  104. </table>
  105. </div>
  106. }
  107. </div>