Edit.cshtml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @using EMIS.Web.Controls;
  2. @using Bowin.Web.Controls.Mvc;
  3. @using EMIS.ViewModel;
  4. @using Bowin.Common.Utility;
  5. @model EMIS.ViewModel.TeachingMaterial.StudentDistributeView
  6. @section scripts{
  7. <script src="~/Scripts/Business/TeachingMaterial/StudentDistributeEdit.js"></script>
  8. <script type="text/javascript">
  9. $(document).ready(function () {
  10. var JsonDate = top.$("#@(Request["WindowID"])").data("inputData");
  11. $("#studentDistributeID").val(JsonDate.studentDistributeID);
  12. $("#GrademajorID").val(JsonDate.GrademajorID);
  13. });
  14. //保存未发放学生数
  15. function StudentDistribute_Save() {
  16. $(document.forms[0]).submit(); //提交表单
  17. }
  18. </script>
  19. }
  20. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  21. @using (Ajax.BeginForm(new AjaxOptions { Url = "/StudentDistribute/Edit", OnSuccess = "EMISFunction.FormSuccess", OnBegin = "EMISFunction.FormSubmit", OnComplete = "EMISFunction.FormComplete" }))
  22. {
  23. <div class="p_title">
  24. @Html.HiddenFor(x => x.StudentDistributeID)
  25. @Html.HiddenFor(x => x.StudentQty)
  26. @Html.Hidden("GrademajorID")
  27. @Html.Hidden("studentDistributeID")
  28. @* <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  29. 未发放学生信息
  30. </div>*@
  31. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
  32. @if (Model.IsDistribute != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
  33. {
  34. @Html.ContextMenuBar("UnDisConfirm")
  35. }
  36. </div>
  37. </div>
  38. <div class="search_list">
  39. @if (Model.IsDistribute != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
  40. {
  41. @Html.ContextMenuBar("Edit-StudentGrid")
  42. }
  43. @Html.DataGrid(new DataGridOptions
  44. {
  45. Columns = new List<DataGridColumn>()
  46. {
  47. new CheckBoxFieldColumn{ HeaderText="", FieldName="UserID"},
  48. new BoundFieldColumn { FieldName="LoginID", HeaderText="学号", Align=AlignStyle.Center, Width=0.1 },
  49. new BoundFieldColumn { FieldName="Name", HeaderText="姓名", Align=AlignStyle.Center, Width=0.05 },
  50. //new BoundFieldColumn { FieldName="", HeaderText="性别", Align=AlignStyle.Center, Width=0.03 },
  51. //new BoundFieldColumn { FieldName="", HeaderText="年级专业名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=10 },
  52. //new BoundFieldColumn { FieldName="", HeaderText="班级名称", Align=AlignStyle.Center, Width=0.1, OverflowLength=10 },
  53. new BoundFieldColumn { FieldName="CreateUserName", HeaderText="创建人", Align=AlignStyle.Center, Width=0.05 },
  54. new BoundFieldColumn { FieldName="CreateTime", HeaderText="创建日期", Align=AlignStyle.Center,Formatter= Formatter.OnlyYearMonthDay, Width=0.08 },
  55. new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.05, OverflowLength=5 }
  56. },
  57. PageSize = 30,
  58. IsCheckOnSelect = true,
  59. DataSourceUrl = Url.Content("~/StudentDistribute/GetStudentList?studentDistributeID=" + Request.Params["studentDistributeID"]),
  60. ID = "dgStudentList",
  61. IsPagination = true,
  62. IsShowRowNumbers = true,
  63. IsPostBack = true,
  64. IsSingleSelect = false
  65. })
  66. </div>
  67. }
  68. </div>