Guest User

Untitled

a guest
Jan 9th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.93 KB | None | 0 0
  1. $('#Product').on('change', function () {
  2. var count = 0;
  3. var value = this.value;
  4.  
  5. $('#results-tbody tr').each(function () {
  6.  
  7. var element = $(this);
  8.  
  9. element.data('filters', element.data('filters').replace(/dropdown/g, ''));
  10.  
  11. if (value !== 'All' && element.data("product").indexOf(value) === -1) {
  12. element.data('filters', element.data('filters') + 'dropdown');
  13. }
  14. count = count + hideOrShow(element);
  15. });
  16. setResultsCount(count);
  17. });
  18. $('#Changes').on('change', function () {
  19. var count = 0;
  20. var value = this.value;
  21. $('#results-tbody tr').each(function () {
  22.  
  23. var element = $(this);
  24.  
  25. element.data('filters', element.data('filters').replace(/dropdown/g, ''));
  26.  
  27. if (value !== 'All' && element.data("oc").indexOf(value) === -1) {
  28. element.data('filters', element.data('filters') + 'dropdown');
  29. }
  30. count = count + hideOrShow(element);
  31. });
  32. setResultsCount(count);
  33. });
  34.  
  35. var productList = new SelectList(
  36. new List<SelectListItem>
  37. {
  38. new SelectListItem {Text = "Flexitouch", Value = "Flexitouch"},
  39. new SelectListItem {Text = "ACTitouch", Value = "ACTitouch"},
  40. new SelectListItem {Text = "Entre", Value = "Entre"},
  41.  
  42.  
  43. }, "Text", "Value");
  44.  
  45. var showList = new SelectList(
  46. new List<SelectListItem>
  47. {
  48. new SelectListItem {Text = "Changes Only", Value = "Changes Only"},
  49. new SelectListItem {Text = "Referrals Only", Value = "Referral Only"},
  50.  
  51.  
  52. }, "Text", "Value");
  53. <div class="layout clinics">
  54.  
  55. @using (Html.BeginForm("AccountSummaryReport", "Reports",
  56. FormMethod.Post))
  57. {
  58. @Html.ValidationSummary(false)
  59. <div style="border-bottom:1px solid #bbb">
  60. <h1>Account Summary Report</h1>
  61. </div>
  62. <!--<div class="filter-btns top">
  63. <h4 class="filter-heading">Quick Search By</h4>
  64. <input type="button" name="all" class="button1 filter-button active" value="All" />
  65. <input type="button" name="flexitouch" class="button1 filter-button" value="Flexitouch" />
  66. <input type="button" name="actitouch" class="button1 filter-button" value="ACTitouch" />
  67. <input type="button" name="entre" class="button1 filter-button" value="Entre" />
  68. </div>-->
  69. <fieldset class="form-wrapper form-side-labels form-labels-125 search-box-center">
  70. <div class="form-field form-full">
  71. <!-- New Dropdown ! -->
  72. <div class="editor-label">
  73. <label>@Html.DisplayNameFor(model => model.Product)</label>
  74. </div>
  75. <div class="editor-field">
  76. @Html.DropDownListFor(model => model.Product, productList, "All", new { @class = "css-class clinic-dropdown" })
  77. </div>
  78. </div>
  79. <div class="form-field form-full">
  80. <div class="editor-label">
  81. <label>@Html.DisplayNameFor(model => model.Changes)</label>
  82. </div>
  83. <div class="editor-field">
  84. @Html.DropDownListFor(model => model.Changes,showList, "All", new { @class = "css-class clinic-dropdown" })
  85. </div>
  86. </div>
  87.  
  88. <div class="form-field">
  89. <input name="SearchButton" type="submit" value="Search" />
  90. </div>
  91.  
  92. </fieldset>
  93.  
  94. <table class="table results-table">
  95. <tr>
  96. <th><i id="count"> (@ViewBag.Count found) </i></th>
  97. </tr>
  98. <tbody id="results-tbody">
  99. @foreach (var item in Model.SearchResults)
  100. {
  101. <tr class="table__row-link" data-patientname"="@item.PatientLastName , @item.PatientLastName"
  102. data-product="@item.Product" data-referral="@item.d_Order_Date" data-oc="@item.d_Order_Complete_Date"
  103. data-approved="@item.ApprovedDate" data-inactive="@item.d_Inactive_Date" data-training="@item.LastTrainedDate" data-links="@item.Links" data-filters="none">
  104. <td>
  105. <a href="@Url.Action("Details", "Patient", new { patientID = item.PT_RecID })">
  106. <strong>@Html.DisplayFor(modelItem => item.PatientLastName, item.PatientFirstName) (@Html.DisplayFor(modelItem => item.PT_RecID))</strong>
  107. <br />
  108. <strong>Product: </strong>@Html.DisplayFor(modelItem => item.Product)
  109. <br />
  110. <strong>Referral: </strong>@Html.DisplayFor(modelItem => item.d_Order_Date)
  111. <br />
  112. <strong>OC: </strong> @Html.DisplayFor(modelItem => item.d_Order_Complete_Date)
  113. <br />
  114. <strong>Shipped: </strong> @Html.DisplayFor(modelItem => item.d_Ship_Date)
  115. <br />
  116. <strong>Approved: </strong> @Html.DisplayFor(modelItem => item.ApprovedDate)
  117. <br />
  118. <strong>Inactive: </strong> @Html.DisplayFor(modelItem => item.d_Inactive_Date)
  119. <br />
  120. <strong>Training: </strong> @Html.DisplayFor(modelItem => item.LastTrainedDate)
  121. <br />
  122. <strong>Links: </strong> @Html.DisplayFor(modelItem => item.Links)
  123. <br />
  124. </a>
  125. </td>
  126. </tr>
  127. }
  128. </tbody>
  129. </table>
  130.  
  131. public class AccountSummaryReportModel
  132. {
  133.  
  134. public string Product { get; set; }
  135. public string Clinic_RecID { get; set; }
  136. public IEnumerable<v_Report_AccountSummary> SearchResults { get; set; }
  137. public string SearchButton { get; set; }
  138. public IEnumerable<SelectListItem> Changes { get; set; }
  139. [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
  140. [DisplayName("Start")]
  141. //[DataType(DataType.Date)]
  142. public DateTime Start { get; set; }
  143. }
Add Comment
Please, Sign In to add comment