"); } else { var appointmentDentists = data.doctorDTOs; var dentistsInfosHtml = ""; $.each(appointmentDentists, function (dentistIndex, dentistData) { dentistsInfosHtml = $("#scriptDoctorsForClinicProfileTemplate").html(); var doctorImage = "/profile/getdenteedoctorprofilepicture?denteeDoctorGUID=" + dentistData.DenteeDoctorGUID; dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorImage}", doctorImage); dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorImage}", doctorImage); dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorName}", dentistData.DoctorName); var formattedAddresss = ((dentistData.AddressNo1 == null || dentistData.AddressNo1.trim() == "") ? "" : dentistData.AddressNo1); formattedAddresss += ((dentistData.AddressNo2 == null || dentistData.AddressNo2.trim() == "") ? "" : " " + dentistData.AddressNo2); //formattedAddresss += ((dentistData.Area == null || dentistData.Area.trim() == "") ? "" : " " + dentistData.Area); formattedAddresss += ((dentistData.City == null || dentistData.City.trim() == "") ? "" : " " + dentistData.City); formattedAddresss += ((dentistData.State == null || dentistData.State.trim() == "") ? "" : " " + dentistData.State); formattedAddresss += ((dentistData.Country == null || dentistData.Country.trim() == "") ? "" : " " + dentistData.Country); formattedAddresss += ((dentistData.Pincode == null || dentistData.Pincode.trim() == "") ? "" : " " + dentistData.Pincode); var formattedArea = ((dentistData.Area == null || dentistData.Area.trim() == "") ? "" : " " + dentistData.Area); dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorAddress}", formattedAddresss); dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorArea}", formattedArea); dentistsInfosHtml = dentistsInfosHtml.replace("{DenteeClinicGUID}", denteeClinicGUID); dentistsInfosHtml = dentistsInfosHtml.replace("{DenteeDoctorGUID}", dentistData.DenteeDoctorGUID); dentistsInfosHtml = dentistsInfosHtml.replace("{DenteeClinicGUID}", denteeClinicGUID); dentistsInfosHtml = dentistsInfosHtml.replace("{DenteeDoctorGUID}", dentistData.DenteeDoctorGUID); dentistsInfosHtml = dentistsInfosHtml.replace("{DenteeDoctorClinicID}", dentistData.DenteeDoctorClinicID); var url = "https://www.dentee.com/Dentist" + ("/" + city + "/" + dentistData.DenteeDoctorGUID + "/"); dentistsInfosHtml = dentistsInfosHtml.replace("{DoctorProfileUrl}", url); $("#divDoctorsInClinic").append(dentistsInfosHtml); }); } }); }