Edit.cshtml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. @model EMIS.ViewModel.CalendarManage.DutyView
  2. @using EMIS.Web.Controls;
  3. @using Bowin.Web.Controls.Mvc;
  4. @{
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ViewBag.Title = "Edit";
  7. ComboGridOptions cgopGeneralsuser = new ComboGridOptions
  8. {
  9. TextField = "Name",
  10. ValueField = "UserID",
  11. GridOptions = new DataGridOptions
  12. {
  13. Columns = new List<DataGridColumn>()
  14. {
  15. new LinkButtonColumn { FieldName="StaffCode", HeaderText="工作证号", Align=AlignStyle.Center },
  16. new BoundFieldColumn { FieldName="Name", HeaderText="值班人名", Align=AlignStyle.Center }
  17. },
  18. IsCheckOnSelect = true,
  19. DataSourceUrl = Url.Content("~/Staff/List"),
  20. IsPagination = true,
  21. IsShowRowNumbers = true,
  22. IsSingleSelect = false
  23. }
  24. };
  25. }
  26. <style type="text/css">
  27. #dutytable
  28. {
  29. width: 100%;
  30. border: 0px none;
  31. }
  32. #dutytable tr
  33. {
  34. min-height: 30px;
  35. }
  36. </style>
  37. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  38. @using (Ajax.BeginForm(new AjaxOptions
  39. {
  40. OnSuccess = "EMISFunction.FormSuccess",
  41. OnBegin = "EMISFunction.FormSubmit",
  42. OnComplete = "EMISFunction.FormComplete"
  43. }))
  44. {
  45. <div class="p_title">
  46. @*<div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  47. 值班安排信息</div>*@
  48. @if (Request["isView"] != "1")
  49. {
  50. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("Edit")</div>
  51. }
  52. </div>
  53. <div class="search_list">
  54. @Html.HiddenFor(x => x.DutyID)
  55. <table cellpadding="0" cellspacing="0" id="dutytable">
  56. @* <tr>
  57. <td>@Html.LabelFor(x => x.CampusID):
  58. </td>
  59. <td>@Html.DropdownListFor(x => x.CampusID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/Campus/CampusDropdownListBanid"), OnSelect = "QueryCampusDropdownList" })
  60. </td>
  61. <td>@Html.LabelFor(x => x.CollegeID):
  62. </td>
  63. <td>@Html.DropdownListFor(x => x.CollegeID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/College/CollegeDropdownListBanid"), OnSelect = "QueryCollegeDropdownList" })
  64. </td>
  65. </tr>*@
  66. <tr>
  67. <td>@Html.LabelFor(x => x.UserID):
  68. </td>
  69. <td>@Html.ComboGridFor(x => x.UserID, cgopGeneralsuser)
  70. </td>
  71. <td>@Html.LabelFor(x => x.DepartmentName):
  72. </td>
  73. <td>@Html.DropdownListFor(x => x.DepartmentID, new DropdownListOptions { BindType = DropdownListBindType.PleaseSelect, ItemSourceUrl = Url.Content("~/Department/DepartmentDropdownAllBanid") })
  74. </td>
  75. </tr>
  76. <tr>
  77. <td>@Html.LabelFor(x => x.DutyTime):
  78. </td>
  79. <td>
  80. @Html.TextBoxFor(x => x.DutyTime, new TextBoxOptions() { TextBoxType = TextBoxType.Date })
  81. </td>
  82. <td>@Html.LabelFor(x => x.TimesSegment):
  83. </td>
  84. <td>@Html.DropdownListFor(x => x.TimesSegment, new DropdownListOptions { ItemSourceUrl = Url.Content("~/Activitie/TimesSegmentDropdownListBanid"), TextField = "Text", ValueField = "Value" })
  85. </td>
  86. </tr>
  87. <tr>
  88. <td>@Html.LabelFor(x => x.StartDate):
  89. </td>
  90. <td>@Html.TextBoxFor(x => x.StartHour, new { style = "width:65px;" }):@Html.TextBoxFor(x => x.StartMinutes, new { style = "width:65px;" })
  91. </td>
  92. <td>@Html.LabelFor(x => x.EndDate):
  93. </td>
  94. <td>@Html.TextBoxFor(x => x.EndHour, new { style = "width:65px;" }):@Html.TextBoxFor(x => x.EndMinutes, new { style = "width:65px;" })
  95. </td>
  96. </tr>
  97. <tr>
  98. <td>@Html.LabelFor(x => x.Description):
  99. </td>
  100. <td colspan="3">@Html.TextAreaFor(x => x.Description, new { style = "width:90%;" })
  101. </td>
  102. </tr>
  103. </table>
  104. </div>
  105. }
  106. </div>
  107. @section scripts{
  108. <script type="text/javascript">
  109. $(function () {
  110. // load();
  111. })
  112. function Duty_Save() {
  113. $(document.forms[0]).submit();
  114. }
  115. // function QueryCampusDropdownList(data) {
  116. // $("#CollegeID").combobox("select", -1);
  117. // $("#CollegeID").combobox("reload", "/College/CollegeDropdownListBanid?campusID=" + data.Value + "&bindType=PleaseSelect");
  118. // }
  119. // function QueryCollegeDropdownList(data) {
  120. // $("#DepartmentID").combobox("select", -1);
  121. // $("#DepartmentID").combobox("reload", "/Department/DepartmentDropdownListBanid?collegeID=" + data.Value + "&bindType=PleaseSelect");
  122. // }
  123. // function load() {
  124. // var campusID = $("input[name='CampusID']").val();
  125. // $("#CollegeID").combobox("reload", "/College/CollegeDropdownListBanid?campusID=" + campusID + "&bindType=PleaseSelect");
  126. // var collegeID = $("input[name='CollegeID']").val();
  127. // $("#DepartmentID").combobox("reload", "/Department/DepartmentDropdownListBanid?collegeID=" + collegeID + "&bindType=PleaseSelect");
  128. // }
  129. </script>
  130. }