There are 2 errors that I could see:
1. The call to method client.saveRecordAsync(objConsultaiton) should be called *after* attaching the client.saveRecordCompleted event handler.
2. Since the consultationID is available only after the Asynchronous call is returned, you need to wait for the Asynchronous call to complete.
The following changed code should work (I have not tested the code):
public int SaveConsultation()
{
ConsultationService client=new ConsultationService(); ConsultationService.Consultation objConsultaiton = ConsultationService.Consultation();
objConsultaiton.consultaitonName = "xxxxx"; objConsultaiton.consultaitonAddress = "yyyyyyy";
AutoResetEvent objAutoReset = new AutoResetEvent(false);
client.saveRecordCompleted += (ss,ee)=>
{
objConsultaiton.consultationID = ss.result;
objAutoReset.Set();
};
client.saveRecordAsync(objConsultaiton);
objAutoReset.WaitOne();
return objConsultaiton.consultationID;
}