Edit.cshtml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. @model EMIS.ViewModel.DQPSystem.SOCDetailView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @using EMIS.ViewModel;
  5. @{
  6. ViewBag.Title = "Edit";
  7. ComboGridOptions cgopFacultymajor = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "FacultymajorID",
  11. Name = "FacultymajorComboGrid",
  12. ID = "FacultymajorComboGrid",
  13. GridOptions = new DataGridOptions
  14. {
  15. Columns = new List<DataGridColumn>()
  16. {
  17. new BoundFieldColumn { FieldName="Code", HeaderText="院系专业编号", Align=AlignStyle.Center },
  18. new BoundFieldColumn { FieldName="Name", HeaderText="院系专业名称", Align=AlignStyle.Center }
  19. },
  20. IsCheckOnSelect = true,
  21. DataSourceUrl = Url.Content("~/Facultymajor/List"),
  22. IsPagination = true,
  23. IsShowRowNumbers = true,
  24. IsSingleSelect = false,
  25. IsShowHeader = false
  26. }
  27. };
  28. ComboGridOptions cgopCourse = new ComboGridOptions
  29. {
  30. TextField = "CourseName",
  31. ValueField = "CoursematerialID",
  32. Name = "CoursematerialIDDropdownGridBo",
  33. ID = "CoursematerialIDDropdownGridBo",
  34. GridOptions = new DataGridOptions
  35. {
  36. Columns = new List<DataGridColumn>()
  37. {
  38. //new LinkButtonColumn { FieldName="CourseCode", HeaderText="课程代码", Width=0.1, Align=AlignStyle.Center },
  39. new BoundFieldColumn { FieldName="CourseName", HeaderText="课程名称", Width=0.3, Align=AlignStyle.Center }
  40. },
  41. IsCheckOnSelect = true,
  42. DataSourceUrl = Url.Content("~/Coursematerial/ListForDropdown"),
  43. IsPagination = true,
  44. IsShowRowNumbers = true,
  45. IsSingleSelect = false
  46. }
  47. };
  48. //开课教研室
  49. ComboGridOptions cgopDepartment = new ComboGridOptions
  50. {
  51. ID = "DepartmentDropdown",
  52. Name = "DepartmentDropdown",
  53. TextField = "Name",
  54. ValueField = "DepartmentID",
  55. GridOptions = new DataGridOptions
  56. {
  57. Columns = new List<DataGridColumn>()
  58. {
  59. //new LinkButtonColumn { FieldName="No", HeaderText="教研室代码", Align=AlignStyle.Center, Width=0.1 },
  60. new BoundFieldColumn { FieldName="Name", HeaderText="教研室名称", Align=AlignStyle.Center, Width=0.2 }
  61. },
  62. //IsAutoLoad = false,
  63. IsCheckOnSelect = true,
  64. DataSourceUrl = Url.Content("~/Department/List"),
  65. IsPagination = true,
  66. IsShowRowNumbers = true,
  67. IsSingleSelect = false,
  68. }
  69. };
  70. }
  71. @section scripts{
  72. <script type = "text/javascript">
  73. var mnu = "";
  74. //加载
  75. $(function () {
  76. mnu = $.SystemGeneral.getUrlParam("MNU");
  77. })
  78. function SOCDetail_Save() {
  79. $(document.forms[0]).submit();
  80. }
  81. function SOCDetail_Upload() {
  82. // var d = validChoose();
  83. // if (d.length == 0) {
  84. // $.messager.alert("系统信息", "请选择您要进行附件管理的信息。");
  85. // return;
  86. // }
  87. // if (d.length > 1) {
  88. // $.messager.alert("系统信息", "只能选择单个记录进行附件管理。");
  89. // return;
  90. // }
  91. var socDetailID = $("#SOCDetailID").val();
  92. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/SOCDetail/Upload?detailID=" + socDetailID + "&MNU=" + mnu;
  93. $.popupTopWindow('附件管理', redirectTo, 800, 600, setAttachment);
  94. }
  95. function setAttachment() {
  96. $.ajaxSetup({
  97. async: false
  98. });
  99. var fileList;
  100. var socDetailID = $("#SOCDetailID").val();
  101. $.post(CMS_SystemConfig.VirtualDirectoryPath + '/SOC/GetFileListByDetailID', { DetailID: socDetailID }, function (data) {
  102. fileList = data;
  103. });
  104. var count = fileList.length;
  105. //var roleViewList = $("#dgSOCDetailList").cmsXDataTable("getRows");
  106. var nameStr = "";
  107. for (var i = 0; i < count; i++) {
  108. var name = fileList[i].FileName;
  109. nameStr = nameStr + "、" + name;
  110. }
  111. $("#IsChangeAttachment").val(1);
  112. nameStr = nameStr.substr(1, (nameStr.length - 1));
  113. $("#SOCDetailAttachment").val(nameStr);
  114. }
  115. </script>
  116. }
  117. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  118. @using (Ajax.BeginForm(new AjaxOptions { OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  119. {
  120. <div class="p_title">
  121. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  122. </div>
  123. <div class="search_list">
  124. @Html.Hidden("hid_ActionsType")
  125. @Html.HiddenFor(x => x.SOCDetailID)
  126. @Html.HiddenFor(x => x.IsChangeAttachment)
  127. <table cellpadding="0" cellspacing="0" id="departmenttable">
  128. <tr>
  129. <td>
  130. @Html.LabelFor(x => x.Name):
  131. </td>
  132. <td>
  133. @Html.TextBoxFor(x => x.Name)
  134. </td>
  135. <td>
  136. @Html.LabelFor(x => x.Credit):
  137. </td>
  138. <td>
  139. @Html.TextBoxFor(x => x.Credit, new TextBoxOptions { IsEnabled = false })
  140. </td>
  141. </tr>
  142. <tr>
  143. <td>
  144. @Html.LabelFor(x => x.Description):
  145. </td>
  146. <td colspan="3">
  147. @Html.TextAreaFor(x => x.Description, 3, 70, null)
  148. </td>
  149. </tr>
  150. <tr>
  151. <td>
  152. @Html.LabelFor(x => x.StartTime):
  153. </td>
  154. <td>
  155. @Html.TextBoxFor(x => x.StartTime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  156. </td>
  157. <td>
  158. @Html.LabelFor(x => x.EndTime):
  159. </td>
  160. <td>
  161. @Html.TextBoxFor(x => x.EndTime, new TextBoxOptions { TextBoxType = TextBoxType.Date })
  162. </td>
  163. </tr>
  164. <tr>
  165. <td>
  166. @Html.LabelFor(x => x.SOCDetailAttachment):
  167. </td>
  168. <td>
  169. @Html.TextBoxFor(x => x.SOCDetailAttachment, new TextBoxOptions { IsEnabled = false, ID = "SOCDetailAttachment", Name = "SOCDetailAttachment" })
  170. </td>
  171. <td>
  172. @Html.LabelFor(x => x.IsGroup):
  173. </td>
  174. <td>
  175. @Html.CheckBoxFor(x => x.IsGroupin)
  176. </td>
  177. </tr>
  178. </table>
  179. </div>
  180. }
  181. </div>