示例#1
0
        public void Update(ProviderProfile profile)
        {
            this.Description = profile.Description.Scrub();
            string website = profile.Website.Scrub();

            // won't link properly in HTML without http
            if (!string.IsNullOrWhiteSpace(website))
            {
                website = website.StartsWith("http://") ? website : string.Concat("http://", website);
            }

            this.Website = website;

            this.BusinessEstablished       = profile.BusinessEstablished;
            this.FacilityAge               = profile.FacilityAge;
            this.FacilityStyle             = profile.FacilityStyle;
            this.FuneralDirectorExperience = profile.FuneralDirectorExperience;
            this.TransportationFleetAge    = profile.TransportationFleetAge;
        }
示例#2
0
        public bool HasChanged(ProviderProfile profile)
        {
            if (this.Description != profile.Description.Scrub())
            {
                return(true);
            }

            if (this.Website != profile.Website.Scrub())
            {
                return(true);
            }

            if (this.BusinessEstablished != profile.BusinessEstablished ||
                this.FacilityAge != profile.FacilityAge ||
                this.FacilityStyle != profile.FacilityStyle ||
                this.FuneralDirectorExperience != profile.FuneralDirectorExperience ||
                this.TransportationFleetAge != profile.TransportationFleetAge)
            {
                return(true);
            }

            return(false);
        }