Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page standardController="AECaseMgmt__Program_Case__c" extensions="CaseNoteFIltered_extn">
- <apex:form >
- <apex:pageBlock title="Select Case Note Filters">
- <apex:pageMessages /> <!-- this is where the error messages will appear -->
- <apex:pageBlockSection >
- <apex:inputField value="{!casenote.FromDate__c}"/>
- <apex:inputField value="{!casenote.EndDate__c}"/>
- </apex:pageBlockSection>
- <apex:pageBlockButtons >
- <apex:commandButton value="Generate" action="{!generate}"/>
- <apex:commandButton value="Cancel" action="{!cancel}"/>
- </apex:pageBlockButtons>
- </apex:pageBlock>
- <apex:page standardController="AECaseMgmt__Program_Case__c" renderAs="PDF" sidebar="false" extensions="CaseNoteFiltered_extn"
- showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
- <head>
- <style>
- @page {
- size:{'8.5in 11in')};
- margin: 5mm;}
- .no-border {
- border: none
- }
- .bottom-border {
- border-bottom: solid black;
- border-width: thin;
- vertical-align: bottom;
- padding: 1px;
- }
- .border-full{
- border: solid 1px black;text-align: center; border="1"
- }
- .top-border {
- border-top: solid black;
- border-width: thin;
- }
- table, th, td {
- padding: 1px;
- font-size: 11px;
- }
- </style>
- </head>
- <body>
- <table style = "font-weight: bold; ">
- <tr>
- <td >
- Family: <apex:outputText value="{!AECaseMgmt__Program_Case__c.AECaseMgmt__Household__r.name}"/>
- </td>
- </tr>
- <tr>
- <td >
- Case #: <apex:outputText value="{!AECaseMgmt__Program_Case__c.RIS_Case_Text_only__c}"/>
- </td>
- </tr>
- </table>
- <table >
- <apex:repeat value="{!casenotelist}" var="casenote">
- <br/>
- <tr>
- <td style = "width: 500px" >Date: <apex:outputfield value="{!casenote.Date_of_Service__c}"/> </td>
- <td style = "width: 500px" > Category: <apex:outputfield value="{!casenote.Category__c}"/> </td>
- </tr>
- <tr>
- <td>Entered by: <apex:outputfield value="{!casenote.Entered_By_User__r.Full_Name__c}"/> </td>
- <td > Case Member (if applicable): <apex:outputfield value="{!casenote.Case_Member__c}"/> </td>
- </tr>
- <br/>
- <tr>
- <td style = "width: 1000px" colspan = "2" class = "bottom-border" >Case Note: <apex:outputfield value="{!casenote.Case_Note__c}"/> </td>
- </tr>
- <br/>
- </apex:repeat>
- </table>
- </body>
- public class CaseNoteFIltered_extn {
- public ApexPages.StandardController stdCntrlr {get; set;}
- public list <RIS_Case_Note__c> casenotelist {get; set;}
- public String currentRecordId {get;set;}
- public RIS_Case_Note__c casenote {get;set;}
- public CaseNoteFiltered_extn(ApexPages.StandardController controller) {
- stdCntrlr = controller;
- casenote = new RIS_Case_Note__c();
- if (casenotelist==null){
- casenotelist = new List <RIS_Case_Note__c>();
- }
- currentRecordId = ApexPages.CurrentPage().getparameters().get('id');
- casenotelist = [Select ID, Date_of_Service__c, Case_Note__c,Category__c, Case_Number__c, Entered_By_User__r.Full_Name__c,
- Case_Member__c
- from RIS_Case_Note__c
- Where Case_Number__c =: controller.getId() AND
- Date_of_Service__c >=: casenote.FromDate__c AND
- Date_of_Service__c <=: casenote.EndDate__c
- ORDER BY Date_of_Service__c ASC];
- }
- public PageReference generate() {
- PageReference pageRef = new PageReference('/apex/case_Notepdf?&id=' + currentRecordId );
- return (pageRef);
- }
- }
Add Comment
Please, Sign In to add comment