public override string ToString()
        {
            string accessibility, utilities;

            if (IsAccessible)
            {
                accessibility = "Yes";
            }
            else
            {
                accessibility = "No";
            }

            if (UtilitiesAreAvail)
            {
                utilities = "Yes";
            }
            else
            {
                utilities = "N/A";
            }

            return(SiteNumber.ToString().PadRight(15) + MaxOccupancy.ToString().PadRight(15) + accessibility.PadRight(15) +
                   MaxRVLength.ToString().PadRight(25) + utilities.PadRight(15));
        }
        //updates values of accessible, rv length, and utilities to be more user-friendly
        public override string ToString()
        {
            if (Accessible == "False")
            {
                Accessible = "No";
            }
            else if (Accessible == "True")
            {
                Accessible = "Yes";
            }

            if (Utilities == "False")
            {
                Utilities = "No";
            }
            else if (Utilities == "True")
            {
                Utilities = "Yes";
            }

            if (MaxRVLength == "0")
            {
                MaxRVLength = "N/A";
            }

            return(SiteId.ToString().PadRight(11) + MaxOccupancy.ToString().PadRight(13) + Accessible.PadRight(15) + MaxRVLength.PadRight(15) + Utilities.PadRight(11) + "$");
        }
Пример #3
0
        public override string ToString()
        {
            string output = $"{SiteId.ToString().PadRight(13)} {MaxOccupancy.ToString().PadRight(17)}";

            if (IsAccessible)
            {
                output += "Yes".PadRight(15);
            }
            else
            {
                output += "No".PadRight(15);
            }

            if (MaxRvLength == 0)
            {
                output += "N/A".PadRight(15);
            }
            else
            {
                output += MaxRvLength.ToString().PadRight(15);
            }

            if (HasUtilities)
            {
                output += "Yes".PadRight(17);
            }
            else
            {
                output += "N/A".PadRight(17);
            }

            output += $"{TotalCost.ToString("C").PadRight(15)}";

            return(output);
        }
Пример #4
0
        public string printListing(int duration)
        {
            string accessible = Accessible == 0 ? "No" : "Yes";
            string utilities  = Utilities == 0 ? "N/A" : "Yes";
            string rvLength   = MaxLength == 0 ? "N/A" : MaxLength.ToString();

            decimal totalCost = duration * CostPerDay;

            return(SiteNumber.ToString().PadRight(15) + MaxOccupancy.ToString().PadRight(15) + accessible.PadRight(12) + rvLength.PadRight(10) + utilities.PadRight(12) + $"{totalCost:C}");
        }
        /// <summary>
        /// Prints formatted site information
        /// </summary>
        /// <returns>The formatted string of site information</returns>
        public override string ToString()
        {
            string accessible  = Accessible ? "Yes" : "No";
            string maxRvLength = MaxRvLength > 0 ? MaxRvLength.ToString() : "N/A";
            string utilities   = Utilities ? "Yes" : "N/A";

            return(SiteNumber.ToString().PadRight(12)
                   + MaxOccupancy.ToString().PadRight(14)
                   + accessible.PadRight(15)
                   + maxRvLength.PadRight(17)
                   + utilities.PadRight(12));
        }
Пример #6
0
        public string GetPrintString(int numberOfDaysReserved, decimal dailyFee)
        {
            decimal reservationCost = numberOfDaysReserved * dailyFee;

            string yesNoForAccessible = "";

            if (Accessible)
            {
                yesNoForAccessible = "Yes";
            }
            else
            {
                yesNoForAccessible = "No";
            }

            string maxRVNA = "";

            if (MaxRv == 0)
            {
                maxRVNA = "N/A";
            }
            else
            {
                maxRVNA = MaxRv.ToString();
            }

            string utilityYesNA = "";

            if (Utilities)
            {
                utilityYesNA = "Yes";
            }
            else
            {
                utilityYesNA = "N/A";
            }
            //edit changed siteNumber to Id
            return(Id.ToString().PadRight(10) + MaxOccupancy.ToString().PadRight(15) +
                   yesNoForAccessible.PadRight(15) + maxRVNA.PadRight(20) + utilityYesNA.PadRight(15) + reservationCost.ToString("C"));
        }
Пример #7
0
 public override string ToString()
 {
     return("".PadRight(5) + SiteNumber.ToString().PadRight(15) + MaxOccupancy.ToString().PadRight(14) + Accessible.ToString().PadRight(16) +
            MaxRvLength.ToString().PadRight(14) + Utility.ToString().PadRight(13) + "$" + totalCost.ToString().PadRight(10));
 }
 public override string ToString()
 {
     return(SiteNumber.ToString().PadRight(10) + MaxOccupancy.ToString().PadRight(15) + Accessible.ToString().PadRight(15) + MaxRVLength.ToString().PadRight(15) + Utilities.ToString().PadRight(10));
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (NormalOccupancy != 0)
            {
                hash ^= NormalOccupancy.GetHashCode();
            }
            if (MaxOccupancy != 0)
            {
                hash ^= MaxOccupancy.GetHashCode();
            }
            if (CleaningTimeCheckoutMins != 0)
            {
                hash ^= CleaningTimeCheckoutMins.GetHashCode();
            }
            if (CleaningTimeStayoverMins != 0)
            {
                hash ^= CleaningTimeStayoverMins.GetHashCode();
            }
            if (CleaningTimeDustMins != 0)
            {
                hash ^= CleaningTimeDustMins.GetHashCode();
            }
            if (CleaningTimeDeepMins != 0)
            {
                hash ^= CleaningTimeDeepMins.GetHashCode();
            }
            if (BaseManagementHolds != 0)
            {
                hash ^= BaseManagementHolds.GetHashCode();
            }
            if (AdditionalWebHolds != 0)
            {
                hash ^= AdditionalWebHolds.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (propertyId_ != null)
            {
                hash ^= PropertyId.GetHashCode();
            }
            if (PropertyName.Length != 0)
            {
                hash ^= PropertyName.GetHashCode();
            }
            if (ChannelManagerId.Length != 0)
            {
                hash ^= ChannelManagerId.GetHashCode();
            }
            return(hash);
        }