<pre lang="c#"><pre lang="c#"><pre lang="c#"><pre lang="c#">
Hi,
Good Morning,
I am using restful wcf service concept and this is the method for the service in the interface.
[OperationContract]
[WebInvoke(Method = WebMethods.POST, UriTemplate = UriTemplates.CreateDoctorProfileUri, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
hxResponseDTO CreateDoctorProfile(CreateDoctorProfileArg createDoctorProfileArg);
and implemented the service
public hxResponseDTO CreateDoctorProfile(CreateDoctorProfileArg createDoctorProfileArg)
{
hxResponseDTO response = null;
try
{
bool actionResult;
string actionOutcome;
if (createDoctorProfileArg != null)
{
DoctorProfileDTO doctorProfileDTO = new DoctorProfileDTO
{
Prefix = createDoctorProfileArg.Prefix,
FirstName = createDoctorProfileArg.FirstName,
LastName = createDoctorProfileArg.LastName,
MiddleName = createDoctorProfileArg.MiddleName,
Sufix = createDoctorProfileArg.Sufix,
Gender = createDoctorProfileArg.Gender,
DateOfBirth = createDoctorProfileArg.DateOfBirth,
MaritalStatus = createDoctorProfileArg.MaritalStatus,
Image = createDoctorProfileArg.Image,
AadhaarNumber = createDoctorProfileArg.AadharNumber,
EmailId = createDoctorProfileArg.EmailId,
MobileNumber = createDoctorProfileArg.MobileNumber,
RegistrationNumber = createDoctorProfileArg.RegisterNumber,
RegistrationAuthority = createDoctorProfileArg.RegistrationAuthority,
Qualification = createDoctorProfileArg.Qualification,
TypeOfMedice = createDoctorProfileArg.TypeOfMedicine,
Specialization = createDoctorProfileArg.Specialization,
GroupId = createDoctorProfileArg.GroupID,
NoofPatients = createDoctorProfileArg.NoofPatients,
PlanSelected = createDoctorProfileArg.PlanSelected,
PaymentFrequency = createDoctorProfileArg.Paymentfrequency,
DiscountsProvided = createDoctorProfileArg.DiscountsProvided,
AuthorizationNote = createDoctorProfileArg.AuthorizationNote,
BillingAddress = createDoctorProfileArg.BillingAddress,
City = createDoctorProfileArg.City,
State = createDoctorProfileArg.State,
Pincode = createDoctorProfileArg.Pincode,
Telephone = createDoctorProfileArg.TelephoneNumber
};
actionResult = DoctorProfileController.CreateDoctorProfile(doctorProfileDTO, out actionOutcome);
response = new hxResponseDTO
{
Result = actionResult,
Message = actionOutcome
};
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
}
return response;
}
where it is taking argument as the class file which accepts some parameters.
So now I need to pass the class file from aspx.cs with the properties same as the class.So I declared the class in the front end and I need to pass the data.
How can I do,please explain me with proper example?