Edit.cshtml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. @model EMIS.ViewModel.CultureplanManage.CourseMaterial.TeachTypeView
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "Edit";
  6. var isEnable = Request["type"] == "detail" ? false : true;
  7. }
  8. @section scripts{
  9. <script src="~/Scripts/Business/CultureplanManage/TeachTypeEdit.js" type="text/javascript"></script>
  10. <script type="text/javascript">
  11. </script>
  12. }
  13. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  14. @using (Ajax.BeginForm(new AjaxOptions
  15. {
  16. OnSuccess = "EMISFunction.FormSuccess",
  17. OnBegin = "EMISFunction.FormSubmit",
  18. OnComplete = "EMISFunction.FormComplete"
  19. }))
  20. {
  21. <div class="p_title">
  22. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  23. </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.ClassGroupingID)
  33. <table cellpadding="0" cellspacing="0" id="teachTypetable">
  34. <tr>
  35. <td style="color: red;">
  36. @Html.LabelFor(x => x.ClassName):
  37. </td>
  38. <td colspan="3">
  39. @Html.TextBoxFor(x => x.ClassName, new TextBoxOptions()
  40. {
  41. IsEnabled = isEnable
  42. }, new Dictionary<string, string> { { "style", "width:54%;" } })
  43. </td>
  44. </tr>
  45. <tr>
  46. <td>
  47. @Html.LabelFor(x => x.TeachingModeIDListName):
  48. </td>
  49. <td colspan="3">
  50. @if (!isEnable)
  51. {
  52. @Html.DataGrid(new DataGridOptions
  53. {
  54. Columns = new List<DataGridColumn>()
  55. {
  56. new BoundFieldColumn { FieldName="TeachingModeID", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.02 },
  57. new BoundFieldColumn { FieldName="TeachingModeName", HeaderText="授课方式", Align=AlignStyle.Center, OrderFieldName="TeachingModeID", Width=0.02 },
  58. new BoundFieldColumn { FieldName="IsDisplayName", HeaderText="是否显示", Align=AlignStyle.Center, OrderFieldName="IsDisplay", Width=0.02, CustomFormatFun="SetRedColumn" },
  59. new CheckButtonColumn { FieldName = "IsDivide", HeaderText= "是否分班", Align=AlignStyle.Center, OrderFieldName="IsDivide", Width=0.02, EnableFieldName="false" }
  60. },
  61. PageSize = 10,
  62. IsPostBack = true,
  63. IsCheckOnSelect = true,
  64. DataSourceUrl = Url.Content("~/TeachType/TeachingModeList?classGroupingID=" + Model.ClassGroupingID),
  65. ID = "dgTeachingModeList",
  66. IsPagination = true,
  67. IsShowRowNumbers = true,
  68. IsSingleSelect = false,
  69. MaxHeight = 200
  70. })
  71. }
  72. else
  73. {
  74. @Html.DataGrid(new DataGridOptions
  75. {
  76. Columns = new List<DataGridColumn>()
  77. {
  78. new BoundFieldColumn { FieldName="TeachingModeID", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.02 },
  79. new BoundFieldColumn { FieldName="TeachingModeName", HeaderText="授课方式", Align=AlignStyle.Center, OrderFieldName="TeachingModeID", Width=0.02 },
  80. new BoundFieldColumn { FieldName="IsDisplayName", HeaderText="是否显示", Align=AlignStyle.Center, OrderFieldName="IsDisplay", Width=0.02, CustomFormatFun="SetRedColumn" },
  81. new CheckButtonColumn { FieldName = "IsDivide", HeaderText= "是否分班", Align=AlignStyle.Center, OrderFieldName="IsDivide", Width=0.02 }
  82. },
  83. PageSize = 10,
  84. IsPostBack = true,
  85. IsCheckOnSelect = true,
  86. DataSourceUrl = Url.Content("~/TeachType/TeachingModeList?classGroupingID=" + Model.ClassGroupingID),
  87. ID = "dgTeachingModeList",
  88. IsPagination = true,
  89. IsShowRowNumbers = true,
  90. IsSingleSelect = false,
  91. MaxHeight = 200
  92. })
  93. }
  94. </td>
  95. </tr>
  96. <tr>
  97. <td>
  98. @Html.LabelFor(x => x.Remark):
  99. </td>
  100. <td colspan="3">
  101. @if (!isEnable)
  102. {
  103. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  104. {
  105. { "style", "width: 90%;min-height: 45px" },
  106. { "disabled", "true" }
  107. })
  108. }
  109. else
  110. {
  111. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
  112. {
  113. { "style", "width: 90%;min-height: 45px" }
  114. })
  115. }
  116. </td>
  117. </tr>
  118. </table>
  119. </div>
  120. }
  121. </div>