Edit.cshtml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. @model EMIS.ViewModel.ExamBatchProjectView
  2. @using EMIS.Web.Controls;
  3. @using EMIS.Entities;
  4. @using Bowin.Web.Controls.Mvc;
  5. @{
  6. ViewBag.Title = "Edit";
  7. ComboGridOptions cgopSchoolYear = new ComboGridOptions
  8. {
  9. TextField = "Code",
  10. ValueField = "SchoolYearID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. new BoundFieldColumn { FieldName="Code", HeaderText="学年学期", Align=AlignStyle.Center ,Width=0.2},
  16. new BoundFieldColumn { FieldName="Years", HeaderText="学年", Align=AlignStyle.Center ,Width=0.2},
  17. new BoundFieldColumn { FieldName="SchoolcodeName", HeaderText="学期", Align=AlignStyle.Center ,Width=0.2},
  18. },
  19. PageSize = 5,
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/SchoolYear/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false
  25. },
  26. IsEnabled = Request.QueryString["Type"] == null,
  27. //OnSelect = "cgopSchoolYearSelect",
  28. OnChange = "cgopSchoolYearSelect",
  29. };
  30. ComboGridOptions cgopBatchProject = new ComboGridOptions
  31. {
  32. TextField = "Name",
  33. ValueField = "ExaminationBatchID",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. new BoundFieldColumn { FieldName="Name", HeaderText="考试批次", Align=AlignStyle.Center ,Width=0.3}
  39. },
  40. PageSize = 5,
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/ExaminationBatch/GetProjectListViewGrid"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false
  46. },
  47. Width = 300,
  48. IsEnabled=Request.QueryString["Type"] == null,
  49. OnSelect = "cgopBatchProjectSelect"
  50. };
  51. }
  52. @section scripts{
  53. <script src="~/Scripts/Business/ExamManage/ExamBatchProjectEdit.js" type="text/javascript"></script>
  54. <script type="text/javascript">
  55. </script>
  56. }
  57. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  58. @using (Ajax.BeginForm(new AjaxOptions
  59. {
  60. OnSuccess = "EMISFunction.FormSuccess",
  61. OnBegin = "EMISFunction.FormSubmit",
  62. OnComplete = "EMISFunction.FormComplete"
  63. }))
  64. {
  65. <div class="p_title">
  66. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  67. </div>
  68. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  69. @if (Request.QueryString["Type"] != "1")//控制列表进入、屏蔽按钮权限
  70. {
  71. @Html.ContextMenuBar("Edit")
  72. }
  73. </div>
  74. </div>
  75. <div class="search_list">
  76. <table cellpadding="0" cellspacing="0" id="Campustable">
  77. <tr>
  78. <td style="width: 150px">
  79. @Html.LabelFor(x => x.SchoolyearID):
  80. </td>
  81. <td colspan="3">
  82. @Html.ComboGridFor(x => x.SchoolyearID, cgopSchoolYear)
  83. </td>
  84. </tr>
  85. <tr>
  86. <td>
  87. @Html.LabelFor(x => x.ExaminationBatchID):
  88. </td>
  89. <td colspan="3">
  90. @Html.ComboGridFor(x => x.ExaminationBatchID, cgopBatchProject)
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>
  95. @Html.LabelFor(x => x.StartDate):
  96. </td>
  97. <td>
  98. @Html.TextBoxFor(x => x.StartDate, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  99. </td>
  100. <td style="width: 150px">
  101. @Html.LabelFor(x => x.EndDate):
  102. </td>
  103. <td>
  104. @Html.TextBoxFor(x => x.EndDate, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  105. </td>
  106. </tr>
  107. @if (Request.QueryString["Type"] != null)//非新增
  108. {
  109. <tr>
  110. <td>
  111. @Html.LabelFor(x => x.Name):
  112. </td>
  113. <td colspan="3">
  114. @Model.Name
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>
  119. @Html.LabelFor(x => x.SimulateTime):
  120. </td>
  121. <td>
  122. @Html.TextBoxFor(x => x.SimulateTime, new TextBoxOptions { })
  123. </td>
  124. <td style="width: 150px">
  125. @Html.LabelFor(x => x.Training):
  126. </td>
  127. <td>
  128. @Html.TextBoxFor(x => x.Training, new TextBoxOptions { })
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>
  133. @Html.LabelFor(x => x.TakeCourseTime):
  134. </td>
  135. <td>
  136. @Html.TextBoxFor(x => x.TakeCourseTime, new TextBoxOptions { })
  137. </td>
  138. <td style="width: 150px">
  139. @Html.LabelFor(x => x.MaxRegistCount):
  140. </td>
  141. <td>
  142. @Html.TextBoxFor(x => x.MaxRegistCount, new TextBoxOptions { })
  143. </td>
  144. </tr>
  145. <tr>
  146. <td>
  147. @Html.LabelFor(x => x.Remark):
  148. </td>
  149. <td colspan="3">
  150. @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 50px" } })
  151. </td>
  152. </tr>
  153. }
  154. @if (Request.QueryString["Type"] == null)//新增
  155. {
  156. <tr>
  157. <td colspan="4">
  158. <div class="p_title">
  159. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  160. 考试项目信息列表</div>
  161. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  162. @if (Request.QueryString["Type"] != "1")
  163. {
  164. @Html.ContextMenuBar("EditList")
  165. }</div>
  166. </div>
  167. <div class="search_list">
  168. @Html.DataGrid(new DataGridOptions
  169. {
  170. Columns = new List<DataGridColumn>()
  171. {
  172. new CheckBoxFieldColumn{ HeaderText="", FieldName="ExaminationProjectID"},
  173. new BoundFieldColumn { FieldName="Name", HeaderText="项目名称", Align=AlignStyle.Center, Width=0.06, },
  174. new BoundFieldColumn { FieldName="ExaminationType", HeaderText="考试类型", Align=AlignStyle.Center, Width=0.1 },
  175. new TextBoxColumn { FieldName="SimulateTime", HeaderText="预考试时间", IsRequired=true,Align=AlignStyle.Center, Width=0.1 },
  176. new TextBoxColumn { FieldName="Training", HeaderText="培训情况", IsRequired=true,Align=AlignStyle.Center, Width=0.1 },
  177. new TextBoxColumn { FieldName="TakeCourseTime", HeaderText="预开课时间",IsRequired=true, Align=AlignStyle.Center, Width=0.1 },
  178. new TextBoxColumn { FieldName="MaxRegistCount", Validator=new OnlyNumberValidator(){ Required=false}, HeaderText="最大报名人数", Align=AlignStyle.Center, Width=0.1 },
  179. new TextBoxColumn { FieldName="Remark", HeaderText="需提交资料及注意事项", Align=AlignStyle.Center, Width=0.1 },
  180. },
  181. IsCheckOnSelect = true,
  182. //DataSourceUrl = Url.Content("~/ExamBatchProject/GetExamBatchProjectListEdiGrid"),
  183. ID = "dgProjectList",
  184. IsPagination = true,
  185. IsShowRowNumbers = true,
  186. IsSingleSelect = false,
  187. IsPostBack = true,
  188. })
  189. </div>
  190. </td>
  191. </tr>
  192. }
  193. </table>
  194. </div>
  195. }
  196. </div>