Edit.cshtml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationTableView
  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. //参评类型
  8. ComboGridOptions cgopEvaluationParticipateType = new ComboGridOptions
  9. {
  10. TextField = "ParticipateTypeName",
  11. ValueField = "EvaluationParticipateTypeID",
  12. IsEnabled = isEnable,
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="ParticipateTypeName", HeaderText="参评类型", Align=AlignStyle.Center, Width=0.12, OrderFieldName="ParticipateTypeID" },
  18. new BoundFieldColumn { FieldName="IsStudentName", HeaderText="学生用", Align=AlignStyle.Center, Width=0.08, OrderFieldName="IsStudent", CustomFormatFun="SetRedColumn"}
  19. },
  20. PageSize = 5,
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/EvaluationParticipateType/List"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false
  26. }
  27. };
  28. //评价类型
  29. ComboGridOptions cgopEvaluationType = new ComboGridOptions
  30. {
  31. TextField = "Name",
  32. ValueField = "EvaluationIntTypeID",
  33. OnSelect = "queryEvaluationType",
  34. IsEnabled = isEnable,
  35. GridOptions = new DataGridOptions
  36. {
  37. Columns = new List<DataGridColumn>()
  38. {
  39. new BoundFieldColumn { FieldName="Code", HeaderText="编号", Align=AlignStyle.Center, Width=0.08 },
  40. new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.12 },
  41. new BoundFieldColumn { FieldName="TeachingModeIDListName", HeaderText="授课方式", Align=AlignStyle.Center, Width=0.15, OrderFieldName="", CustomFormatFun="SetRedColumn" }
  42. },
  43. PageSize = 5,
  44. IsCheckOnSelect = true,
  45. DataSourceUrl = Url.Content("~/EvaluationIntType/List"),
  46. IsPagination = true,
  47. IsShowRowNumbers = true,
  48. IsSingleSelect = false
  49. }
  50. };
  51. }
  52. @section scripts{
  53. <script src="~/Scripts/Business/EvaluationManage/EvaluationTable/EvaluationTableEdit.js" type="text/javascript"></script>
  54. <script type="text/javascript">
  55. var nonSelect = "@DropdownList.SELECT_ALL";
  56. </script>
  57. }
  58. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  59. @using (Ajax.BeginForm(new AjaxOptions
  60. {
  61. OnSuccess = "EMISFunction.FormSuccess",
  62. OnBegin = "EMISFunction.FormSubmit",
  63. OnComplete = "EMISFunction.FormComplete"
  64. }))
  65. {
  66. <div class="p_title">
  67. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;"></div>
  68. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  69. @if (Request["type"] != "detail")
  70. {
  71. @Html.ContextMenuBar("Edit")
  72. }
  73. </div>
  74. </div>
  75. <div class="search_list">
  76. @Html.HiddenFor(x => x.EvaluationTableID)
  77. <table cellpadding="0" cellspacing="0" id="evaluationtabletable">
  78. <tr>
  79. <td>
  80. @Html.LabelFor(x => x.ParticipateTypeName):
  81. </td>
  82. <td>
  83. @Html.ComboGridFor(x => x.EvaluationParticipateTypeID, cgopEvaluationParticipateType)
  84. </td>
  85. <td>
  86. @Html.LabelFor(x => x.EvaluationTypeName):
  87. </td>
  88. <td>
  89. @Html.ComboGridFor(x => x.EvaluationTypeID, cgopEvaluationType)
  90. </td>
  91. </tr>
  92. <tr>
  93. <td style="color:red;">
  94. @Html.LabelFor(x => x.Code):
  95. </td>
  96. <td>
  97. @Html.TextBoxFor(x => x.Code, new TextBoxOptions() { IsEnabled = isEnable })
  98. </td>
  99. <td>
  100. @Html.LabelFor(x => x.TeachingModeIDListName):
  101. </td>
  102. <td>
  103. @Html.TextBoxFor(x => x.TeachingModeIDListName, new TextBoxOptions() { IsEnabled = false })
  104. </td>
  105. </tr>
  106. <tr>
  107. <td style="color:red;">
  108. @Html.LabelFor(x => x.Name):
  109. </td>
  110. <td colspan="3">
  111. @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:90%;" } })
  112. </td>
  113. </tr>
  114. <tr>
  115. <td style="color:red;">
  116. @Html.LabelFor(x => x.Weight):
  117. </td>
  118. <td>
  119. @Html.TextBoxFor(x => x.Weight, new TextBoxOptions() { IsEnabled = isEnable })
  120. </td>
  121. <td style="color:red;">
  122. @Html.LabelFor(x => x.IsEnabledName):
  123. </td>
  124. <td>
  125. @if (!isEnable)
  126. {
  127. @Html.CheckBoxFor(x => x.IsEnabled, new Dictionary<string, object>() { { "disabled", isEnable } })
  128. }
  129. else
  130. {
  131. @Html.CheckBoxFor(x => x.IsEnabled)
  132. }
  133. </td>
  134. </tr>
  135. <tr>
  136. <td>
  137. @Html.LabelFor(x => x.Remark):
  138. </td>
  139. <td colspan="3">
  140. @if (!isEnable)
  141. {
  142. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  143. {
  144. { "style", "width: 90%;min-height: 60px" },
  145. { "disabled", "true" }
  146. })
  147. }
  148. else
  149. {
  150. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
  151. }
  152. </td>
  153. </tr>
  154. </table>
  155. </div>
  156. }
  157. </div>