示例#1
0
        /// <summary>
        /// This gets the community information block
        /// </summary>
        /// <param name="CommunityNumber"></param>
        /// <returns></returns>
        public string CommunityInformationSnapIn()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"width:325px;\">");
            sb.AppendLine("<tr>");
            sb.AppendLine("<td style=\"background-color:#f7f7f7;border:3px solid #efefef;\">");
            sb.AppendFormat("<div style=\"color: #4a6d94; padding-bottom: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: bold;\">{0}</div>", CommunityName);

            sb.AppendFormat("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%;margin-bottom:5px;\">");
            sb.AppendFormat("<tbody>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<td style=\"background-color:#FFFFFF;padding:10px;border-top:#e5e5e5 1px solid;border-bottom:#d2d2d2 1px solid;border-left:#dbdbdb 1px solid;border-right:#dbdbdb 1px solid;width: 100%;\"> ");
            sb.AppendFormat("<img src=\"../../../../../../../images/Community/{0}0.jpg\" width='120' style=\"padding:0px 7px 0px 0px;\" align='left' >", CommunityNumber);

            sb.AppendFormat("<div class=\"ContactInformation\" style=\"font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:14px;color:#999999;\">");

            if (Address1.WhenNullOrEmpty(string.Empty).Length > 0 && City.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendLine(Address1 + "<br>");
                if (Address2.WhenNullOrEmpty(string.Empty).Length > 0)
                {
                    sb.AppendLine(Address2 + "<br>");
                }
                sb.AppendLine(City + ",");
                sb.AppendLine(State + " " + Country);
                sb.AppendLine(PostalCode + "<br>");
            }
            if (PhoneNumber1.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Phone: {0}<br />", PhoneNumber1);
            }
            if (FaxNumber.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Fax: {0}<br />", FaxNumber);
            }
            sb.AppendFormat("</div>");

            if (Region.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<br><div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Region: {0}</div>", Region.WhenNullOrEmpty("&nbsp;"));
            }
            if (Division.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Division: {0}</div>", Division.WhenNullOrEmpty("&nbsp;"));
            }

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            return(sb.ToString());
        }
示例#2
0
        public void SetUp()
        {
            string number          = "(345) 789-0123";
            string differentNumber = "456-7890";

            faxNumber          = new FaxNumber(number);
            sameFaxNumber      = new FaxNumber(number);
            differentFaxNumber = new FaxNumber(differentNumber);
        }
示例#3
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (EmailAddress != null)
         {
             hashCode = hashCode * 59 + EmailAddress.GetHashCode();
         }
         if (FaxNumber != null)
         {
             hashCode = hashCode * 59 + FaxNumber.GetHashCode();
         }
         if (PhoneNumber != null)
         {
             hashCode = hashCode * 59 + PhoneNumber.GetHashCode();
         }
         if (PostCode != null)
         {
             hashCode = hashCode * 59 + PostCode.GetHashCode();
         }
         if (StateOrProvince != null)
         {
             hashCode = hashCode * 59 + StateOrProvince.GetHashCode();
         }
         if (Street1 != null)
         {
             hashCode = hashCode * 59 + Street1.GetHashCode();
         }
         if (Street2 != null)
         {
             hashCode = hashCode * 59 + Street2.GetHashCode();
         }
         if (MediumCharacteristicType != null)
         {
             hashCode = hashCode * 59 + MediumCharacteristicType.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (FaxNumber != null)
         {
             hashCode = hashCode * 59 + FaxNumber.GetHashCode();
         }
         if (PhoneNumber != null)
         {
             hashCode = hashCode * 59 + PhoneNumber.GetHashCode();
         }
         return(hashCode);
     }
 }
        public bool Equals(ContactInfo other)
        {
            if (other == null)
            {
                return(false);
            }

            return((Email == other.Email ||
                    Email != null &&
                    Email.Equals(other.Email)) &&
                   (PhoneNumber == other.PhoneNumber ||
                    PhoneNumber != null &&
                    PhoneNumber.Equals(other.PhoneNumber)) &&
                   (FaxNumber == other.FaxNumber ||
                    FaxNumber != null &&
                    FaxNumber.Equals(other.FaxNumber)) &&
                   (Address == other.Address ||
                    Address != null &&
                    Address.Equals(other.Address)));
        }
示例#6
0
        public void SetUp()
        {
            string name          = "Testy McTest";
            string differentName = "Example Exampleton";

            contact          = new Contact(name);
            sameContact      = new Contact(name);
            differentContact = new Contact(differentName);

            address = new Address("123 Example Road", "Portland", "OR", "12345");
            differentContact.Addresses.Add(address);

            phoneNumber = new PhoneNumber("(123) 456-7890");
            differentContact.PhoneNumbers.Add(phoneNumber);

            faxNumber = new FaxNumber("(234) 567-8901");
            differentContact.FaxNumbers.Add(faxNumber);

            emailAddress = new EmailAddress("*****@*****.**");
            differentContact.EmailAddresses.Add(emailAddress);
        }
示例#7
0
        /// <summary>
        /// Returns true if ContactDetails instances are equal
        /// </summary>
        /// <param name="other">Instance of ContactDetails to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ContactDetails other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FaxNumber == other.FaxNumber ||
                     FaxNumber != null &&
                     FaxNumber.Equals(other.FaxNumber)
                     ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ));
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (GivenName.Length != 0)
            {
                hash ^= GivenName.GetHashCode();
            }
            if (GivenName2.Length != 0)
            {
                hash ^= GivenName2.GetHashCode();
            }
            if (FamilyName.Length != 0)
            {
                hash ^= FamilyName.GetHashCode();
            }
            if (Email.Length != 0)
            {
                hash ^= Email.GetHashCode();
            }
            if (HomePhone.Length != 0)
            {
                hash ^= HomePhone.GetHashCode();
            }
            if (MobilePhone.Length != 0)
            {
                hash ^= MobilePhone.GetHashCode();
            }
            if (FaxNumber.Length != 0)
            {
                hash ^= FaxNumber.GetHashCode();
            }
            if (OfficePhone.Length != 0)
            {
                hash ^= OfficePhone.GetHashCode();
            }
            if (OfficeAddress1.Length != 0)
            {
                hash ^= OfficeAddress1.GetHashCode();
            }
            if (OfficeAddress2.Length != 0)
            {
                hash ^= OfficeAddress2.GetHashCode();
            }
            if (OfficeCity.Length != 0)
            {
                hash ^= OfficeCity.GetHashCode();
            }
            if (OfficeState.Length != 0)
            {
                hash ^= OfficeState.GetHashCode();
            }
            if (OfficeZip.Length != 0)
            {
                hash ^= OfficeZip.GetHashCode();
            }
            if (OfficeNation.Length != 0)
            {
                hash ^= OfficeNation.GetHashCode();
            }
            if (HomeAddress1.Length != 0)
            {
                hash ^= HomeAddress1.GetHashCode();
            }
            if (HomeAddress2.Length != 0)
            {
                hash ^= HomeAddress2.GetHashCode();
            }
            if (HomeCity.Length != 0)
            {
                hash ^= HomeCity.GetHashCode();
            }
            if (HomeState.Length != 0)
            {
                hash ^= HomeState.GetHashCode();
            }
            if (HomeZip.Length != 0)
            {
                hash ^= HomeZip.GetHashCode();
            }
            if (HomeNation.Length != 0)
            {
                hash ^= HomeNation.GetHashCode();
            }
            if (CompanyName.Length != 0)
            {
                hash ^= CompanyName.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (FirstName.Length != 0)
            {
                hash ^= FirstName.GetHashCode();
            }
            if (LastName.Length != 0)
            {
                hash ^= LastName.GetHashCode();
            }
            if (HomeAddress1.Length != 0)
            {
                hash ^= HomeAddress1.GetHashCode();
            }
            if (HomeAddress2.Length != 0)
            {
                hash ^= HomeAddress2.GetHashCode();
            }
            if (HomeCity.Length != 0)
            {
                hash ^= HomeCity.GetHashCode();
            }
            if (HomeState.Length != 0)
            {
                hash ^= HomeState.GetHashCode();
            }
            if (HomeZip.Length != 0)
            {
                hash ^= HomeZip.GetHashCode();
            }
            if (HomeNation.Length != 0)
            {
                hash ^= HomeNation.GetHashCode();
            }
            if (HomePhoneNumber.Length != 0)
            {
                hash ^= HomePhoneNumber.GetHashCode();
            }
            if (OfficeAddress1.Length != 0)
            {
                hash ^= OfficeAddress1.GetHashCode();
            }
            if (OfficeAddress2.Length != 0)
            {
                hash ^= OfficeAddress2.GetHashCode();
            }
            if (OfficeCity.Length != 0)
            {
                hash ^= OfficeCity.GetHashCode();
            }
            if (OfficeState.Length != 0)
            {
                hash ^= OfficeState.GetHashCode();
            }
            if (OfficeZip.Length != 0)
            {
                hash ^= OfficeZip.GetHashCode();
            }
            if (OfficeNation.Length != 0)
            {
                hash ^= OfficeNation.GetHashCode();
            }
            if (OfficePhoneNumber.Length != 0)
            {
                hash ^= OfficePhoneNumber.GetHashCode();
            }
            if (MobilePhoneNumber.Length != 0)
            {
                hash ^= MobilePhoneNumber.GetHashCode();
            }
            if (FaxNumber.Length != 0)
            {
                hash ^= FaxNumber.GetHashCode();
            }
            if (EmailAddress.Length != 0)
            {
                hash ^= EmailAddress.GetHashCode();
            }
            if (IsBlacklisted != false)
            {
                hash ^= IsBlacklisted.GetHashCode();
            }
            if (CompanyName.Length != 0)
            {
                hash ^= CompanyName.GetHashCode();
            }
            if (GivenName2.Length != 0)
            {
                hash ^= GivenName2.GetHashCode();
            }
            return(hash);
        }
示例#10
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (checkinTimeOfDay_ != null)
            {
                hash ^= CheckinTimeOfDay.GetHashCode();
            }
            if (checkOutTimeOfDay_ != null)
            {
                hash ^= CheckOutTimeOfDay.GetHashCode();
            }
            if (rolloverTimeOfDay_ != null)
            {
                hash ^= RolloverTimeOfDay.GetHashCode();
            }
            if (AllowedEarlyCheckinHours != 0)
            {
                hash ^= AllowedEarlyCheckinHours.GetHashCode();
            }
            if (IifDocnumPrefix.Length != 0)
            {
                hash ^= IifDocnumPrefix.GetHashCode();
            }
            if (IifCustomerName.Length != 0)
            {
                hash ^= IifCustomerName.GetHashCode();
            }
            if (checkinDeposit_ != null)
            {
                hash ^= CheckinDeposit.GetHashCode();
            }
            if (lastRevenueAccrualStart_ != null)
            {
                hash ^= LastRevenueAccrualStart.GetHashCode();
            }
            if (lastDateHkRolloverRan_ != null)
            {
                hash ^= LastDateHkRolloverRan.GetHashCode();
            }
            if (Address1.Length != 0)
            {
                hash ^= Address1.GetHashCode();
            }
            if (Address2.Length != 0)
            {
                hash ^= Address2.GetHashCode();
            }
            if (City.Length != 0)
            {
                hash ^= City.GetHashCode();
            }
            if (State.Length != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (Zip.Length != 0)
            {
                hash ^= Zip.GetHashCode();
            }
            if (PhoneNumber.Length != 0)
            {
                hash ^= PhoneNumber.GetHashCode();
            }
            if (cardMerchant_ != null)
            {
                hash ^= CardMerchant.GetHashCode();
            }
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (maximumAuthorizationAmount_ != null)
            {
                hash ^= MaximumAuthorizationAmount.GetHashCode();
            }
            if (DefaultStayLength != 0)
            {
                hash ^= DefaultStayLength.GetHashCode();
            }
            if (Website.Length != 0)
            {
                hash ^= Website.GetHashCode();
            }
            if (ReservationEmail.Length != 0)
            {
                hash ^= ReservationEmail.GetHashCode();
            }
            if (FaxNumber.Length != 0)
            {
                hash ^= FaxNumber.GetHashCode();
            }
            if (BookingPrefix.Length != 0)
            {
                hash ^= BookingPrefix.GetHashCode();
            }
            if (VoidAuthorizationsAfterDays != 0)
            {
                hash ^= VoidAuthorizationsAfterDays.GetHashCode();
            }
            if (NoShowDelayHours != 0)
            {
                hash ^= NoShowDelayHours.GetHashCode();
            }
            return(hash);
        }
示例#11
0
        /// <summary>
        /// Returns true if MediumCharacteristic instances are equal
        /// </summary>
        /// <param name="other">Instance of MediumCharacteristic to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(MediumCharacteristic other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     City == other.City ||
                     City != null &&
                     City.Equals(other.City)
                     ) &&
                 (
                     Country == other.Country ||
                     Country != null &&
                     Country.Equals(other.Country)
                 ) &&
                 (
                     EmailAddress == other.EmailAddress ||
                     EmailAddress != null &&
                     EmailAddress.Equals(other.EmailAddress)
                 ) &&
                 (
                     FaxNumber == other.FaxNumber ||
                     FaxNumber != null &&
                     FaxNumber.Equals(other.FaxNumber)
                 ) &&
                 (
                     PhoneNumber == other.PhoneNumber ||
                     PhoneNumber != null &&
                     PhoneNumber.Equals(other.PhoneNumber)
                 ) &&
                 (
                     PostCode == other.PostCode ||
                     PostCode != null &&
                     PostCode.Equals(other.PostCode)
                 ) &&
                 (
                     StateOrProvince == other.StateOrProvince ||
                     StateOrProvince != null &&
                     StateOrProvince.Equals(other.StateOrProvince)
                 ) &&
                 (
                     Street1 == other.Street1 ||
                     Street1 != null &&
                     Street1.Equals(other.Street1)
                 ) &&
                 (
                     Street2 == other.Street2 ||
                     Street2 != null &&
                     Street2.Equals(other.Street2)
                 ) &&
                 (
                     MediumCharacteristicType == other.MediumCharacteristicType ||
                     MediumCharacteristicType != null &&
                     MediumCharacteristicType.Equals(other.MediumCharacteristicType)
                 ));
        }