示例#1
0
        public void Copy(RuralListing newRuralListing)
        {
            if (newRuralListing == null)
            {
                throw new ArgumentNullException("newRuralListing");
            }

            base.Copy(newRuralListing);

            if (newRuralListing.IsCategoryTypeModified)
            {
                CategoryType = newRuralListing.CategoryType;
            }

            if (newRuralListing.IsPricingModified)
            {
                if (newRuralListing.Pricing == null)
                {
                    Pricing = null;
                }
                else
                {
                    if (Pricing == null)
                    {
                        Pricing = new SalePricing();
                    }

                    if (newRuralListing.Pricing.IsModified)
                    {
                        Pricing.Copy(newRuralListing.Pricing);
                    }

                    IsPricingModified = true;
                }
            }

            if (newRuralListing.IsAuctionOnModified)
            {
                AuctionOn = newRuralListing.AuctionOn;
            }

            if (newRuralListing.IsRuralFeaturesModified)
            {
                if (newRuralListing.RuralFeatures == null)
                {
                    RuralFeatures = null;
                }
                else
                {
                    if (RuralFeatures == null)
                    {
                        RuralFeatures = new RuralFeatures();
                    }

                    if (newRuralListing.RuralFeatures.IsModified)
                    {
                        RuralFeatures.Copy(newRuralListing.RuralFeatures);
                    }

                    IsRuralFeaturesModified = true;
                }
            }

            if (newRuralListing.IsCouncilRatesModified)
            {
                CouncilRates = newRuralListing.CouncilRates;
            }

            if (newRuralListing.IsBuildingDetailsModified)
            {
                if (newRuralListing.BuildingDetails == null)
                {
                    BuildingDetails = null;
                }
                else
                {
                    if (BuildingDetails == null)
                    {
                        BuildingDetails = new BuildingDetails();
                    }

                    if (newRuralListing.BuildingDetails.IsModified)
                    {
                        BuildingDetails.Copy(newRuralListing.BuildingDetails);
                    }

                    IsBuildingDetailsModified = true;
                }
            }
        }
        public void Copy(RentalListing newRentalListing)
        {
            if (newRentalListing == null)
            {
                throw new ArgumentNullException("newRentalListing");
            }

            base.Copy(newRentalListing);

            if (newRentalListing.IsPropertyTypeModified)
            {
                PropertyType = newRentalListing.PropertyType;
            }

            if (newRentalListing.IsAvailableOnModified)
            {
                AvailableOn = newRentalListing.AvailableOn;
            }

            if (newRentalListing.IsPricingModified)
            {
                if (newRentalListing.Pricing == null)
                {
                    Pricing = null;
                }
                else
                {
                    if (Pricing == null)
                    {
                        Pricing = new RentalPricing();
                    }

                    if (newRentalListing.Pricing.IsModified)
                    {
                        Pricing.Copy(newRentalListing.Pricing);
                    }

                    IsPricingModified = true;
                }
            }

            if (newRentalListing.IsBuildingDetailsModified)
            {
                if (newRentalListing.BuildingDetails == null)
                {
                    BuildingDetails = null;
                }
                else
                {
                    if (BuildingDetails == null)
                    {
                        BuildingDetails = new BuildingDetails();
                    }

                    if (newRentalListing.BuildingDetails.IsModified)
                    {
                        BuildingDetails.Copy(newRentalListing.BuildingDetails);
                    }

                    IsBuildingDetailsModified = true;
                }
            }
        }
示例#3
0
        public void Copy(ResidentialListing newResidentialListing)
        {
            if (newResidentialListing == null)
            {
                throw new ArgumentNullException("newResidentialListing");
            }

            if (!newResidentialListing.IsModified)
            {
                return;
            }

            base.Copy(newResidentialListing);

            if (newResidentialListing.IsPropertyTypeModified)
            {
                PropertyType = newResidentialListing.PropertyType;
            }

            if (newResidentialListing.IsPricingModified)
            {
                if (newResidentialListing.Pricing == null)
                {
                    Pricing = null;
                }
                else
                {
                    if (Pricing == null)
                    {
                        Pricing = new SalePricing();
                    }

                    if (newResidentialListing.Pricing.IsModified)
                    {
                        Pricing.Copy(newResidentialListing.Pricing);
                    }

                    IsPricingModified = true;
                }
            }

            if (newResidentialListing.IsAuctionOnModified)
            {
                AuctionOn = newResidentialListing.AuctionOn;
            }

            if (newResidentialListing.IsCouncilRatesModified)
            {
                CouncilRates = newResidentialListing.CouncilRates;
            }

            if (newResidentialListing.IsBuildingDetailsModified)
            {
                if (newResidentialListing.BuildingDetails == null)
                {
                    BuildingDetails = null;
                }
                else
                {
                    if (BuildingDetails == null)
                    {
                        BuildingDetails = new BuildingDetails();
                    }

                    if (newResidentialListing.BuildingDetails.IsModified)
                    {
                        BuildingDetails.Copy(newResidentialListing.BuildingDetails);
                    }

                    IsBuildingDetailsModified = true;
                }
            }
        }