Guest User

Untitled

a guest
Jan 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. <apex:page standardController="AECaseMgmt__Program_Case__c" extensions="CaseNoteFIltered_extn">
  2.  
  3. <apex:form >
  4.  
  5. <apex:pageBlock title="Select Case Note Filters">
  6. <apex:pageMessages /> <!-- this is where the error messages will appear -->
  7.  
  8. <apex:pageBlockSection >
  9. <apex:inputField value="{!casenote.FromDate__c}"/>
  10. <apex:inputField value="{!casenote.EndDate__c}"/>
  11. </apex:pageBlockSection>
  12.  
  13. <apex:pageBlockButtons >
  14. <apex:commandButton value="Generate" action="{!generate}"/>
  15. <apex:commandButton value="Cancel" action="{!cancel}"/>
  16.  
  17. </apex:pageBlockButtons>
  18. </apex:pageBlock>
  19.  
  20. <apex:page standardController="AECaseMgmt__Program_Case__c" renderAs="PDF" sidebar="false" extensions="CaseNoteFiltered_extn"
  21. showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
  22. <head>
  23. <style>
  24. @page {
  25. size:{'8.5in 11in')};
  26. margin: 5mm;}
  27.  
  28.  
  29. .no-border {
  30. border: none
  31. }
  32.  
  33. .bottom-border {
  34. border-bottom: solid black;
  35. border-width: thin;
  36. vertical-align: bottom;
  37. padding: 1px;
  38. }
  39.  
  40. .border-full{
  41. border: solid 1px black;text-align: center; border="1"
  42. }
  43.  
  44. .top-border {
  45. border-top: solid black;
  46. border-width: thin;
  47. }
  48.  
  49. table, th, td {
  50. padding: 1px;
  51. font-size: 11px;
  52. }
  53.  
  54.  
  55. </style>
  56.  
  57. </head>
  58. <body>
  59.  
  60.  
  61.  
  62. <table style = "font-weight: bold; ">
  63.  
  64. <tr>
  65. <td >
  66. Family: <apex:outputText value="{!AECaseMgmt__Program_Case__c.AECaseMgmt__Household__r.name}"/>
  67. </td>
  68. </tr>
  69. <tr>
  70. <td >
  71. Case #: <apex:outputText value="{!AECaseMgmt__Program_Case__c.RIS_Case_Text_only__c}"/>
  72. </td>
  73. </tr>
  74.  
  75. </table>
  76.  
  77. <table >
  78. <apex:repeat value="{!casenotelist}" var="casenote">
  79. <br/>
  80. <tr>
  81. <td style = "width: 500px" >Date: <apex:outputfield value="{!casenote.Date_of_Service__c}"/> </td>
  82. <td style = "width: 500px" > Category: <apex:outputfield value="{!casenote.Category__c}"/> </td>
  83. </tr>
  84.  
  85. <tr>
  86. <td>Entered by: <apex:outputfield value="{!casenote.Entered_By_User__r.Full_Name__c}"/> </td>
  87. <td > Case Member (if applicable): <apex:outputfield value="{!casenote.Case_Member__c}"/> </td>
  88. </tr>
  89.  
  90. <br/>
  91. <tr>
  92. <td style = "width: 1000px" colspan = "2" class = "bottom-border" >Case Note: <apex:outputfield value="{!casenote.Case_Note__c}"/> </td>
  93. </tr>
  94. <br/>
  95. </apex:repeat>
  96. </table>
  97.  
  98. </body>
  99.  
  100. public class CaseNoteFIltered_extn {
  101. public ApexPages.StandardController stdCntrlr {get; set;}
  102. public list <RIS_Case_Note__c> casenotelist {get; set;}
  103. public String currentRecordId {get;set;}
  104. public RIS_Case_Note__c casenote {get;set;}
  105. public CaseNoteFiltered_extn(ApexPages.StandardController controller) {
  106.  
  107. stdCntrlr = controller;
  108. casenote = new RIS_Case_Note__c();
  109. if (casenotelist==null){
  110. casenotelist = new List <RIS_Case_Note__c>();
  111. }
  112. currentRecordId = ApexPages.CurrentPage().getparameters().get('id');
  113.  
  114. casenotelist = [Select ID, Date_of_Service__c, Case_Note__c,Category__c, Case_Number__c, Entered_By_User__r.Full_Name__c,
  115. Case_Member__c
  116. from RIS_Case_Note__c
  117. Where Case_Number__c =: controller.getId() AND
  118. Date_of_Service__c >=: casenote.FromDate__c AND
  119. Date_of_Service__c <=: casenote.EndDate__c
  120. ORDER BY Date_of_Service__c ASC];
  121.  
  122. }
  123. public PageReference generate() {
  124. PageReference pageRef = new PageReference('/apex/case_Notepdf?&id=' + currentRecordId );
  125.  
  126. return (pageRef);
  127. }
  128. }
Add Comment
Please, Sign In to add comment