Guest User

Untitled

a guest
Feb 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. insert hoh;
  2. insert acc;
  3. primarycontact.accountId = acc.id;
  4. upsert primarycontact;
  5. othercontact.accountId = acc.id;
  6. othercontact.Contact1__c = primarycontact.Id;
  7. insert othercontact;
  8. for(contact cc : ContactList){
  9. cc.accountId = acc.id;
  10. cc.Contact1__c = primarycontact.Id;
  11. }
  12. upsert ContactList;
  13. }
  14. }
  15.  
  16. <apex:pageBlocksection title="Demographic Data: (All information is confidential and is used in applying for grants to fund this program.)" columns="3">
  17. <apex:inputField value="{!primarycontact.Spanish_translation_Services_Needed__c}"/>
  18. <apex:inputField value="{!primarycontact.Race_Check_One__c}"/>
  19. <apex:inputField value="{!primarycontact.Marital_Status_check_one__c}"/>
  20. <apex:inputField value="{!primarycontact.HIGHEST_LEVEL_OF_EDUCATION_Check_one__c}"/>
  21. <apex:inputField value="{!primarycontact.Employment_check_one__c}"/>
  22. </apex:pageBlocksection>
  23.  
  24. <apex:pageBlocksection title="Income:" columns="3">
  25. <apex:inputField value="{!primarycontact.Annual_Income__c}"/>
  26. <apex:inputField value="{!primarycontact.Source_of_Income__c}"/>
  27. <apex:inputField value="{!primarycontact.Primary_Method_of_Transportation__c}"/>
  28. </apex:pageBlocksection>
  29.  
  30. <apex:pageBlocksection title="HOUSEHOLD Information:" columns="3">
  31. <apex:inputField value="{!othercontact.Other_Adult_First_Name__c}"/>
  32. <apex:inputField value="{!othercontact.LastName}"/>
  33. <apex:inputField value="{!othercontact.Date_of_Birth__c}"/>
  34. <apex:inputField value="{!othercontact.Gender__c}"/>
  35. <apex:inputField value="{!othercontact.Relationship_Primary_Care_Provider__c}"/>
  36. <apex:inputField value="{!othercontact.Medical_Insurance__c }"/>
  37. </apex:pageBlocksection>
  38.  
  39. <apex:pageBlocksection title="Children (all children currently in your household, INCLUDING those participating in this program):" columns="1" />
  40. <apex:variable var="rowNum" value="{!0}"/>
  41. <!--<apex:pageBlock id="membAdd"/> -->
  42. <apex:variable var="rowNum" value="{!0}"/>
  43.  
  44. <apex:pageblockSection id="pbs1">
  45. <apex:pageBlockTable value="{!ContactList}" var="c">
  46. <apex:column headerValue="Number" style="width:20px; text-align:center;" headerClass="centertext">
  47. <apex:outputText value="{0,number, ###}" style="text-align:center;">
  48. <apex:param value="{!rowNum+1}"/>
  49. </apex:outputText>
  50. </apex:column>
  51.  
  52. <apex:column headerValue="Name">
  53. <apex:inputfield value="{!c.lastName}"/>
  54. </apex:column>
  55.  
  56. <apex:column headerValue="Delete">
  57. <apex:commandLink style="font-size:15px; font-weight:bold; text-align:center;color:red;" value="X" action="{!delRow}" reRender="pbs1" rendered="{!rowNum>0}">
  58. <apex:param value="{!rowNum}" name="index"/>
  59. </apex:commandLink>
  60. <apex:variable var="rowNum" value="{!rowNum+1}"/>
  61. </apex:column>
  62.  
  63. <apex:column headerValue="AddRow">
  64. <apex:commandButton value="Add Row" action="{!addRow}"/>
  65. </apex:column>
  66.  
  67. </apex:pageBlockTable>
  68. </apex:pageblockSection>
  69. <apex:commandButton value="Save" action="{!save}"/>
  70.  
  71. </apex:pageBlock>
Add Comment
Please, Sign In to add comment