public override string ToStackedString()
        {
            StringBuilder result = new StringBuilder();

            var marketDate = "Home not for sale";

            if (MarketDate != null)
            {
                marketDate = $"Market Date: {MarketDate.ToString() }";
            }

            result.AppendLine($"HomeID: { this.HomeID }");
            result.AppendLine($"Address: { this.Address }");
            result.AppendLine($"City: { this.City }");
            result.AppendLine($"State: { this.State }");
            result.AppendLine($"Zip Code: { this.Zip.Substring(0, 5) }-{ this.Zip.Substring(5, 4) }");
            result.AppendLine(marketDate);
            result.AppendLine($"*** { PersonType } Info ***");
            result.AppendLine($"Name: { owner.FullName }");
            result.AppendLine($"Phone: { owner.PhoneNumber }");
            result.AppendLine($"EMail: { owner.Email }");
            result.AppendLine($"Preferred Lender: { owner.PreferredLender }");

            return(result.ToString());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Recommended GetHashCode() override when overriding Equals() (IDE generated code]
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            int hashCode = 1752065002;

            //hashCode = hashCode * -1521134295 + SoldDate.GetHashCode();
            hashCode = hashCode * -1521134295 + SaleAmount.GetHashCode();
            hashCode = hashCode * -1521134295 + MarketDate.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 3
0
        public override int GetHashCode()
        {
            var hashCode = -63552794;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Address);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Zip);

            hashCode = hashCode * -1521134295 + MarketDate.GetHashCode();
            hashCode = hashCode * -1521134295 + SaleAmount.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 4
0
 public bool Equals(HomesForSaleReportModel other)
 {
     if (Object.ReferenceEquals(other, null))
     {
         return(false);
     }
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Address.Equals(other.Address) && Zip.Equals(other.Zip) &&
            SaleAmount.Equals(other.SaleAmount) && MarketDate.Equals(other.MarketDate));
 }