Beispiel #1
0
        /// <summary>
        /// Sets all listing details.
        /// </summary>
        /// <param name="makeMeMove">The make me move.</param>
        /// <param name="forSaleByOwner">For sale by owner.</param>
        /// <param name="forSaleByAgent">For sale by agent.</param>
        /// <param name="reportForSale">The report for sale.</param>
        /// <param name="forRent">For rent.</param>
        private void SetAllListingDetails(PostingInfoDetail makeMeMove, PostingInfoDetail forSaleByOwner, PostingInfoDetail forSaleByAgent, PostingInfoDetail reportForSale, PostingInfoDetail forRent)
        {
            int ranking = 1;
            int totalCount = makeMeMove.Count + forSaleByOwner.Count + forSaleByAgent.Count + reportForSale.Count + forRent.Count;

            AllListing.Count = totalCount;

            foreach (var listing1 in makeMeMove.Listings)
            {
                listing1.Ranking = ranking++;
                listing1.ListingCategory = AppResources.Zillow_MakeMeMove;
                AllListing.Listings.Add(listing1);
            }

            foreach (var listing2 in forSaleByOwner.Listings)
            {
                listing2.Ranking = ranking++;
                listing2.ListingCategory = "For Sale By Owner";
                AllListing.Listings.Add(listing2);
            }

            foreach (var listing3 in forSaleByAgent.Listings)
            {
                listing3.Ranking = ranking++;
                listing3.ListingCategory = "For Sale By Agent";
                AllListing.Listings.Add(listing3);
            }

            foreach (var listing4 in reportForSale.Listings)
            {
                listing4.Ranking = ranking++;
                listing4.ListingCategory = "Report For Sale";
                AllListing.Listings.Add(listing4);
            }

            foreach (var listing5 in forRent.Listings)
            {
                listing5.Ranking = ranking++;
                listing5.ListingCategory = "For Rent";
                AllListing.Listings.Add(listing5);
            }
        }
Beispiel #2
0
 private void InitializeProperties()
 {
     MakeMeMove = new PostingInfoDetail();
     ForSaleByOwner = new PostingInfoDetail();
     ForSaleByAgent = new PostingInfoDetail();
     ReportForSale = new PostingInfoDetail();
     ForRent = new PostingInfoDetail();
     AllListing = new PostingInfoDetail();
 }
Beispiel #3
0
        private void SetPropertyInfoDetails(PostingInfoDetail posting, PropertyData propData)
        {
            if(propData != null)
            {
                posting.Count = propData.Count;
                if (propData.PropertyListings != null)
                {
                    foreach (var prop in propData.PropertyListings)
                    {
                        PostingListing listing = new PostingListing();
                        listing.LastRefreshedDate = prop.LastRefreshedDate;
                        listing.Price = prop.Price;
                        if (prop.Property != null)
                        {
                            listing.PropertyType = prop.Property.UseCode;
                            listing.Bedrooms = prop.Property.Bedrooms;
                            listing.Bathrooms = prop.Property.Bathrooms;
                            listing.LotSize = prop.Property.LotSizeSqFt;
                            listing.FinishedSize = prop.Property.FinishedSqFt;
                            if (prop.Property.Links != null)
                            {
                                listing.HomeDetailUrl = prop.Property.Links.HomeDetails;
                            }
                            if (prop.Property.Address != null)
                            {
                                listing.StreetAddress = prop.Property.Address.Street;
                                listing.City = prop.Property.Address.City;
                                listing.State = prop.Property.Address.State;
                                listing.ZipCode = prop.Property.Address.ZipCode;
                                listing.Latitude = prop.Property.Address.Latitude;
                                listing.Longitude = prop.Property.Address.Longitude;
                            }
                        }

                        posting.Listings.Add(listing);
                    }
                }
            }
        }