Ejemplo n.º 1
0
        public string BuildSeoSchemaField(ServiceOrgUnitDto location)
        {
            var sb = new StringBuilder();

            sb.Append("<div class='SeoSchema' itemscope itemtype='http://schema.org/MedicalOrganization'>");

            //Name
            sb.AppendFormat("<meta itemprop='name' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Name));

            //Address
            sb.Append("<div itemprop='address' itemscope itemtype='http://schema.org/PostalAddress'>");
            sb.AppendFormat("<meta itemprop='streetAddress' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Address1));
            sb.AppendFormat("<meta itemprop='addressLocality' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.City));
            sb.AppendFormat("<meta itemprop='addressRegion' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.State));
            sb.AppendFormat("<meta itemprop='postalCode' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.Zip));
            sb.Append("</div>");

            //Phone
            sb.AppendFormat("<meta itemprop='telephone' content='{0}' />", CommonUtils.MakeXmlSafeValue(location.PhoneNumber));

            sb.Append("</div>");

            return sb.ToString();
        }
Ejemplo n.º 2
0
 public static int ComparebyDistance(ServiceOrgUnitDto dto1, ServiceOrgUnitDto dto2)
 {
     return dto1.Distance.CompareTo(dto2.Distance);
 }