Advertisement
Guest User

SMD.cshtml

a guest
Apr 28th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1.  
  2. @{
  3. ViewBag.Title = "SMD";
  4. Layout = "~/Views/Shared/_Layout.cshtml";
  5. }
  6.  
  7. <link href="~/Content/jqx.base.css" rel="stylesheet" />
  8. <script src="~/Scripts/jqxcore.js"></script>
  9. <script src="~/Scripts/jqxbuttons.js"></script>
  10. <script src="~/Scripts/jqxscrollbar.js"></script>
  11. <script src="~/Scripts/jqxdata.js"></script>
  12. <script src="~/Scripts/jqxdata.export.js"></script>
  13. <script src="~/Scripts/jqxdate.js"></script>
  14. <script src="~/Scripts/jqxscheduler.js"></script>
  15. <script src="~/Scripts/jqxscheduler.api.js"></script>
  16. <script src="~/Scripts/jqxdatetimeinput.js"></script>
  17. <script src="~/Scripts/jqxmenu.js"></script>
  18. <script src="~/Scripts/jqxcalendar.js"></script>
  19. <script src="~/Scripts/jqxtooltip.js"></script>
  20. <script src="~/Scripts/jqxwindow.js"></script>
  21. <script src="~/Scripts/jqxcheckbox.js"></script>
  22. <script src="~/Scripts/jqxlistbox.js"></script>
  23. <script src="~/Scripts/jqxdropdownlist.js"></script>
  24. <script src="~/Scripts/jqxnumberinput.js"></script>
  25. <script src="~/Scripts/jqxradiobutton.js"></script>
  26. <script src="~/Scripts/jqxinput.js"></script>
  27.  
  28.  
  29.  
  30.  
  31.  
  32. <h2>SMD</h2>
  33.  
  34.  
  35. <div id="scheduler">
  36. </div>
  37. <br />
  38. <div style='margin-left: 10px; float: left;'>
  39. <input type="button" value="Export to Excel" id='excelExport' />
  40. <input type="button" value="Export to PDF" id='pdfExport' />
  41. </div>
  42. <div class="form-group"> </div>
  43. <div class="form-group"> </div>
  44. <div>
  45. @if (ViewData["JobList"] != null)
  46. {
  47. <div class="row">
  48. <div class="col-md-12">
  49. <table class="table table-striped table-hover" onclick="handleClick(event);">
  50. <tr>
  51. <th>Part No.</th>
  52. <th>Job No.</th>
  53. <th>Job Qty</th>
  54. <th>Scheduled Start Time</th>
  55. <th>Scheduled Finish Time</th>
  56. <th></th>
  57. </tr>
  58. <tbody>
  59. @foreach (System.Data.DataRow row in ViewBag.JobList.Rows)
  60. {
  61. <tr>
  62. <td>@row["PartNum"].ToString()</td>
  63. <td>@row["Epicorjob"].ToString()</td>
  64. <td>@row["Qty"].ToString()</td>
  65. <td>@row["SchedStart"].ToString()</td>
  66. <td>@row["SchedFinish"].ToString()</td>
  67. <td>
  68. <form name="@row["Epicorjob"].ToString()" action="#">
  69. <input id="@row["Epicorjob"].ToString()" type="button" name="edit" value="Highlight Job" class="btn btn-primary">
  70. <input id="@row["Epicorjob"].ToString()" type="button" name="edit" value="Open Edit Dialog" class="btn btn-success">
  71. </form>
  72. </td>
  73. </tr>
  74. }
  75. </tbody>
  76. </table>
  77. </div>
  78. </div>
  79. }
  80. </div>
  81.  
  82.  
  83.  
  84.  
  85. @section Scripts {
  86.  
  87. <script type="text/javascript">
  88.  
  89. $(document).ready(function () {
  90. var source =
  91. {
  92. dataType: "json",
  93. dataFields: [
  94. { name: 'id', type: 'string' },
  95. { name: 'description', type: 'string' },
  96. { name: 'location', type: 'string' },
  97. { name: 'subject', type: 'string' },
  98. { name: 'calendar', type: 'string' },
  99. { name: 'start', type: 'date' },
  100. { name: 'end', type: 'date' },
  101. { name: 'allDay', type: 'boolean' },
  102. { name: 'jobtime', type: 'number' }
  103. ],
  104. id: 'id',
  105. //url: '/Schedule/GetSMDScheduleData'
  106. url: '../Content/jobs.txt'
  107. };
  108. var adapter = new $.jqx.dataAdapter(source);
  109. $("#scheduler").jqxScheduler({
  110. //date: new $.jqx.date(2015, 11, 23),
  111. width: 1200,
  112. editDialogDateTimeFormatString: 'dd-MM-yyyy HH:mm',
  113. editDialogDateFormatString: 'dd-MM-yyyy',
  114. height: 1200,
  115. dayNameFormat: "abbr",
  116. source: adapter,
  117. showLegend: true,
  118. resources:
  119. {
  120. colorScheme: "scheme05",
  121. dataField: "calendar",
  122. orientation: "horizontal",
  123. source: new $.jqx.dataAdapter(source)
  124. },
  125. appointmentDataFields:
  126. {
  127. from: "start",
  128. to: "end",
  129. id: "id",
  130. description: "description",
  131. location: "location",
  132. subject: "subject",
  133. resourceId: "calendar",
  134. allDay: "allDay",
  135. tooltip: "description",
  136. jobtime: "jobtime"
  137.  
  138. },
  139. view: 'weekView',
  140. views:
  141. [
  142. { type: 'dayView', showWeekends: true, timeRuler: { scaleStartHour: 0, scaleEndHour: 24, scale: "quarterHour", formatString: 'HH:mm' }, workTime: { fromDayOfWeek: 1, toDayOfWeek: 6, fromHour: 0, toHour: 24 }, appointmentsRenderMode: "exactTime" },
  143. { type: 'weekView', showWeekends: true, timeRuler: { scaleStartHour: 0, scaleEndHour: 24, scale: "quarterHour", formatString: 'HH:mm' }, workTime: { fromDayOfWeek: 1, toDayOfWeek: 7, fromHour: 0, toHour: 24 }, appointmentsRenderMode: "exactTime" },
  144. { type: 'monthView' }
  145. ]
  146. });
  147. });
  148.  
  149. </script>
  150. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement