Advertisement
Guest User

Untitled

a guest
Jan 13th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. <apex:page standardController="contact" extensions="contact1">
  2. <apex:form id="frm">
  3.  
  4. <apex:pageBlock >
  5. <style>
  6.  
  7. body .bPageBlock .pbBody .red .pbSubheader{
  8.  
  9. background-color:#c1cdcd;
  10.  
  11. }
  12.  
  13. body .bPageBlock .pbBody .grey .pbSubheader{
  14. background-color:#c0c0c0;
  15. }
  16. body .bPageBlock .pbBody .grey .pbSubheader h3{
  17. color:#000;
  18. }
  19. p {
  20. color: Black;
  21. font-family: Times New Roman;
  22. font-size: 160%;
  23. div {
  24. font-weight:bold;
  25. }
  26. </style>
  27.  
  28. <p><b>Doctor Details</b></p>
  29. <br/>
  30. <apex:pageBlockSection title="Personal Information" collapsible="false">
  31. <apex:inputField value="{!objcontact.Salutation}"/><br/>
  32. <apex:inputField value="{!objcontact.FirstName}"/>
  33. <apex:inputField value="{!objcontact.LastName}"/>
  34. <apex:inputField value="{!objcontact.MailingStreet}"/>
  35. <apex:inputField value="{!objcontact.MailingCity}"/>
  36. <apex:inputField value="{!objcontact.MailingState}"/>
  37. <apex:inputField value="{!objcontact.MobilePhone}"/>
  38. <apex:inputField value="{!objcontact.Email}"/>
  39.  
  40. </apex:pageBlockSection>
  41. <apex:pageBlockSection title="Professional Information" collapsible="false">
  42.  
  43. <apex:inputField value="{!objcontact.Qualification__c}"/>
  44. <apex:inputField value="{!objcontact.Specialization_Field__c}"/>
  45. <apex:inputField value="{!objcontact.Years_of_Experience__c}"/>
  46. <apex:inputField value="{!objcontact.Last_visit__c}"/>
  47. </apex:pageBlockSection>
  48.  
  49. <apex:pageBlockButtons >
  50. <apex:commandButton value="Save" action="{!save}"/>
  51. <apex:commandButton action="{!cancel}" value="Cancel"/>
  52. </apex:pageBlockButtons>
  53. </apex:pageBlock>
  54. </apex:form>
  55. </apex:page>
  56.  
  57. public with sharing class contact1
  58. {
  59. public contact objcontact{get;set;}
  60. public String Email { get; set; }
  61. public String conId { get; set; }
  62. public List<contact> con { get; set; }
  63. public boolean x{get;set;}
  64. public String conname { get; set; }
  65. public String conEmail { get; set; }
  66. public contact1(ApexPages.StandardController controller)
  67. {
  68. objcontact=new contact();
  69. x=false;
  70. system.debug('`````````'+x); }
  71. public void save()
  72. {
  73. con=[select email from contact];
  74. System.debug('1111111111111'+con);
  75. Email=objcontact.Email;
  76. System.debug('1111111111111'+Email);
  77. insert objcontact;
  78. PageReference newocp = new PageReference('/apex/VFPage1?conId= contact.Id');
  79. newocp.setRedirect(True);
  80. system.debug('????????'+x); }
  81. }
  82.  
  83.  
  84.  
  85. //pagereference pr = new pagereference('/'+objcontact.id);
  86. //return ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement