Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page standardController="contact" extensions="contact1">
- <apex:form id="frm">
- <apex:pageBlock >
- <style>
- body .bPageBlock .pbBody .red .pbSubheader{
- background-color:#c1cdcd;
- }
- body .bPageBlock .pbBody .grey .pbSubheader{
- background-color:#c0c0c0;
- }
- body .bPageBlock .pbBody .grey .pbSubheader h3{
- color:#000;
- }
- p {
- color: Black;
- font-family: Times New Roman;
- font-size: 160%;
- div {
- font-weight:bold;
- }
- </style>
- <p><b>Doctor Details</b></p>
- <br/>
- <apex:pageBlockSection title="Personal Information" collapsible="false">
- <apex:inputField value="{!objcontact.Salutation}"/><br/>
- <apex:inputField value="{!objcontact.FirstName}"/>
- <apex:inputField value="{!objcontact.LastName}"/>
- <apex:inputField value="{!objcontact.MailingStreet}"/>
- <apex:inputField value="{!objcontact.MailingCity}"/>
- <apex:inputField value="{!objcontact.MailingState}"/>
- <apex:inputField value="{!objcontact.MobilePhone}"/>
- <apex:inputField value="{!objcontact.Email}"/>
- </apex:pageBlockSection>
- <apex:pageBlockSection title="Professional Information" collapsible="false">
- <apex:inputField value="{!objcontact.Qualification__c}"/>
- <apex:inputField value="{!objcontact.Specialization_Field__c}"/>
- <apex:inputField value="{!objcontact.Years_of_Experience__c}"/>
- <apex:inputField value="{!objcontact.Last_visit__c}"/>
- </apex:pageBlockSection>
- <apex:pageBlockButtons >
- <apex:commandButton value="Save" action="{!save}"/>
- <apex:commandButton action="{!cancel}" value="Cancel"/>
- </apex:pageBlockButtons>
- </apex:pageBlock>
- </apex:form>
- </apex:page>
- public with sharing class contact1
- {
- public contact objcontact{get;set;}
- public String Email { get; set; }
- public String conId { get; set; }
- public List<contact> con { get; set; }
- public boolean x{get;set;}
- public String conname { get; set; }
- public String conEmail { get; set; }
- public contact1(ApexPages.StandardController controller)
- {
- objcontact=new contact();
- x=false;
- system.debug('`````````'+x); }
- public void save()
- {
- con=[select email from contact];
- System.debug('1111111111111'+con);
- Email=objcontact.Email;
- System.debug('1111111111111'+Email);
- insert objcontact;
- PageReference newocp = new PageReference('/apex/VFPage1?conId= contact.Id');
- newocp.setRedirect(True);
- system.debug('????????'+x); }
- }
- //pagereference pr = new pagereference('/'+objcontact.id);
- //return ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement