Пример #1
0
        /// <summary>
        /// Create Cancellation Policy
        /// </summary>
        /// <param name="cancellationPolicyViewModel"></param>
        /// <returns>returns the Id of the newly created cancellation policy</returns>
        private async Task <BaseResult <CancellationPolicy> > CreateCancellationPolicy(CancellationPolicyViewModel cancellationPolicyViewModel)
        {
            BaseResult <CancellationPolicy> result = new BaseResult <CancellationPolicy>();

            result.Result = new CancellationPolicy();
            CancellationPolicy cancellationPolicy = new CancellationPolicy()
            {
                HotelId = cancellationPolicyViewModel.HotelId,
                CancellationPolicyTypeId    = cancellationPolicyViewModel.CancellationPolicyTypeId,
                NoShowCancellationChargesId = cancellationPolicyViewModel.NoShowCancellationChargesId,
                IsNoShowCharges             = cancellationPolicyViewModel.IsNoShowCharges,
                IsActive  = cancellationPolicyViewModel.IsActive,
                IsDeleted = cancellationPolicyViewModel.IsDeleted,
                Name      = cancellationPolicyViewModel.Name
            };
            var insertResult = await this.iCancellationPolicyConnectionLibrary.InsertEntity(cancellationPolicy).ConfigureAwait(false);

            if (insertResult.IsError || insertResult.ExceptionMessage != null)
            {
                result.IsError          = true;
                result.ExceptionMessage = insertResult.ExceptionMessage;
                return(result);
            }
            if (insertResult == null)
            {
                result = null;
            }
            result.Result.Id = (int)insertResult.Result;
            return(result);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (ProviderName.Length != 0)
            {
                hash ^= ProviderName.GetHashCode();
            }
            if (ProviderCode.Length != 0)
            {
                hash ^= ProviderCode.GetHashCode();
            }
            if (DisableGuestCorrespondence != false)
            {
                hash ^= DisableGuestCorrespondence.GetHashCode();
            }
            if (DisableCorrespondenceRateTable != false)
            {
                hash ^= DisableCorrespondenceRateTable.GetHashCode();
            }
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (VirtualCardIdentifier.Length != 0)
            {
                hash ^= VirtualCardIdentifier.GetHashCode();
            }
            hash ^= requestRoomType_.GetHashCode();
            return(hash);
        }
        public async Task <IActionResult> Edit(decimal id, [Bind("Id,Name")] CancellationPolicy cancellationPolicy)
        {
            if (id != cancellationPolicy.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cancellationPolicy);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CancellationPolicyExists(cancellationPolicy.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(cancellationPolicy));
        }
        public async Task <IActionResult> Create([Bind("Id,Name")] CancellationPolicy cancellationPolicy)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cancellationPolicy);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cancellationPolicy));
        }
 public void MergeFrom(OTAChannelProvider other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Channels.OTAChannelProviderIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.ProviderName.Length != 0)
     {
         ProviderName = other.ProviderName;
     }
     if (other.ProviderCode.Length != 0)
     {
         ProviderCode = other.ProviderCode;
     }
     if (other.DisableGuestCorrespondence != false)
     {
         DisableGuestCorrespondence = other.DisableGuestCorrespondence;
     }
     if (other.DisableCorrespondenceRateTable != false)
     {
         DisableCorrespondenceRateTable = other.DisableCorrespondenceRateTable;
     }
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.VirtualCardIdentifier.Length != 0)
     {
         VirtualCardIdentifier = other.VirtualCardIdentifier;
     }
     requestRoomType_.Add(other.requestRoomType_);
 }
Пример #6
0
    private void SearchAndBind()
    {
        HotelMerchandise m_SaleMerchandise = (HotelMerchandise)this.OnSearch();

        if (m_SaleMerchandise.Items.Count > 0)
        {
            string hotelid = this.Request["HotelID"];
            string hotelName = this.Request["HotelName"];
            string strCheckin = this.Request["CheckIn"];
            string strGTACityCode = this.Request["GTACITYCODE"];

            if (this.Request["edit"] == "y")
                DeleteBeingChangedHotelOrderItem(hotelName, strCheckin);

            MVHotel currentHotel = GetBeingChangedHotel(m_SaleMerchandise, hotelid, hotelName, strCheckin, strGTACityCode);

            RoomTypeList cancel = new RoomTypeList();

            RoomTypeList canceldelete = new RoomTypeList();

            if (currentHotel != null && currentHotel.Profile.GetParam("DATASOURCE").ToString().Trim().ToUpper() == "GTA")
            {

                Terms.Sales.Business.CancellationPolicy Policy = new CancellationPolicy();

                cancel = Policy.GetIsNoHotelCancellation(currentHotel, true, out canceldelete);

            }

            if (currentHotel.Items.Count > 0)
            {
                HTLSelectRoomTypeControl1.RoomCancel = cancel;
                HTLSelectRoomTypeControl1.RoomDelete = canceldelete;
                HTLSelectRoomTypeControl1.HotelMaterial = currentHotel;
            }
            else
            {
                this.Response.Redirect("SearchResultForm.aspx" + "?ConditionID=" + Request.Params["ConditionID"]);
            }

        }
        else
        {
            this.Response.Redirect("~/Index.aspx");
        }
    }
        public override int GetHashCode()
        {
            int hashCode = 114929036;

            if (LocationTypes != null)
            {
                hashCode += LocationTypes.GetHashCode();
            }

            if (AlignmentTime != null)
            {
                hashCode += AlignmentTime.GetHashCode();
            }

            if (MinBookingLeadTimeSeconds != null)
            {
                hashCode += MinBookingLeadTimeSeconds.GetHashCode();
            }

            if (MaxBookingLeadTimeSeconds != null)
            {
                hashCode += MaxBookingLeadTimeSeconds.GetHashCode();
            }

            if (AnyTeamMemberBookingEnabled != null)
            {
                hashCode += AnyTeamMemberBookingEnabled.GetHashCode();
            }

            if (MultipleServiceBookingEnabled != null)
            {
                hashCode += MultipleServiceBookingEnabled.GetHashCode();
            }

            if (MaxAppointmentsPerDayLimitType != null)
            {
                hashCode += MaxAppointmentsPerDayLimitType.GetHashCode();
            }

            if (MaxAppointmentsPerDayLimit != null)
            {
                hashCode += MaxAppointmentsPerDayLimit.GetHashCode();
            }

            if (CancellationWindowSeconds != null)
            {
                hashCode += CancellationWindowSeconds.GetHashCode();
            }

            if (CancellationFeeMoney != null)
            {
                hashCode += CancellationFeeMoney.GetHashCode();
            }

            if (CancellationPolicy != null)
            {
                hashCode += CancellationPolicy.GetHashCode();
            }

            if (CancellationPolicyText != null)
            {
                hashCode += CancellationPolicyText.GetHashCode();
            }

            if (SkipBookingFlowStaffSelection != null)
            {
                hashCode += SkipBookingFlowStaffSelection.GetHashCode();
            }

            return(hashCode);
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is BusinessAppointmentSettings other &&
                   ((LocationTypes == null && other.LocationTypes == null) || (LocationTypes?.Equals(other.LocationTypes) == true)) &&
                   ((AlignmentTime == null && other.AlignmentTime == null) || (AlignmentTime?.Equals(other.AlignmentTime) == true)) &&
                   ((MinBookingLeadTimeSeconds == null && other.MinBookingLeadTimeSeconds == null) || (MinBookingLeadTimeSeconds?.Equals(other.MinBookingLeadTimeSeconds) == true)) &&
                   ((MaxBookingLeadTimeSeconds == null && other.MaxBookingLeadTimeSeconds == null) || (MaxBookingLeadTimeSeconds?.Equals(other.MaxBookingLeadTimeSeconds) == true)) &&
                   ((AnyTeamMemberBookingEnabled == null && other.AnyTeamMemberBookingEnabled == null) || (AnyTeamMemberBookingEnabled?.Equals(other.AnyTeamMemberBookingEnabled) == true)) &&
                   ((MultipleServiceBookingEnabled == null && other.MultipleServiceBookingEnabled == null) || (MultipleServiceBookingEnabled?.Equals(other.MultipleServiceBookingEnabled) == true)) &&
                   ((MaxAppointmentsPerDayLimitType == null && other.MaxAppointmentsPerDayLimitType == null) || (MaxAppointmentsPerDayLimitType?.Equals(other.MaxAppointmentsPerDayLimitType) == true)) &&
                   ((MaxAppointmentsPerDayLimit == null && other.MaxAppointmentsPerDayLimit == null) || (MaxAppointmentsPerDayLimit?.Equals(other.MaxAppointmentsPerDayLimit) == true)) &&
                   ((CancellationWindowSeconds == null && other.CancellationWindowSeconds == null) || (CancellationWindowSeconds?.Equals(other.CancellationWindowSeconds) == true)) &&
                   ((CancellationFeeMoney == null && other.CancellationFeeMoney == null) || (CancellationFeeMoney?.Equals(other.CancellationFeeMoney) == true)) &&
                   ((CancellationPolicy == null && other.CancellationPolicy == null) || (CancellationPolicy?.Equals(other.CancellationPolicy) == true)) &&
                   ((CancellationPolicyText == null && other.CancellationPolicyText == null) || (CancellationPolicyText?.Equals(other.CancellationPolicyText) == true)) &&
                   ((SkipBookingFlowStaffSelection == null && other.SkipBookingFlowStaffSelection == null) || (SkipBookingFlowStaffSelection?.Equals(other.SkipBookingFlowStaffSelection) == true)));
        }
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"LocationTypes = {(LocationTypes == null ? "null" : $"[{ string.Join(", ", LocationTypes)} ]")}");
     toStringOutput.Add($"AlignmentTime = {(AlignmentTime == null ? "null" : AlignmentTime.ToString())}");
     toStringOutput.Add($"MinBookingLeadTimeSeconds = {(MinBookingLeadTimeSeconds == null ? "null" : MinBookingLeadTimeSeconds.ToString())}");
     toStringOutput.Add($"MaxBookingLeadTimeSeconds = {(MaxBookingLeadTimeSeconds == null ? "null" : MaxBookingLeadTimeSeconds.ToString())}");
     toStringOutput.Add($"AnyTeamMemberBookingEnabled = {(AnyTeamMemberBookingEnabled == null ? "null" : AnyTeamMemberBookingEnabled.ToString())}");
     toStringOutput.Add($"MultipleServiceBookingEnabled = {(MultipleServiceBookingEnabled == null ? "null" : MultipleServiceBookingEnabled.ToString())}");
     toStringOutput.Add($"MaxAppointmentsPerDayLimitType = {(MaxAppointmentsPerDayLimitType == null ? "null" : MaxAppointmentsPerDayLimitType.ToString())}");
     toStringOutput.Add($"MaxAppointmentsPerDayLimit = {(MaxAppointmentsPerDayLimit == null ? "null" : MaxAppointmentsPerDayLimit.ToString())}");
     toStringOutput.Add($"CancellationWindowSeconds = {(CancellationWindowSeconds == null ? "null" : CancellationWindowSeconds.ToString())}");
     toStringOutput.Add($"CancellationFeeMoney = {(CancellationFeeMoney == null ? "null" : CancellationFeeMoney.ToString())}");
     toStringOutput.Add($"CancellationPolicy = {(CancellationPolicy == null ? "null" : CancellationPolicy.ToString())}");
     toStringOutput.Add($"CancellationPolicyText = {(CancellationPolicyText == null ? "null" : CancellationPolicyText == string.Empty ? "" : CancellationPolicyText)}");
     toStringOutput.Add($"SkipBookingFlowStaffSelection = {(SkipBookingFlowStaffSelection == null ? "null" : SkipBookingFlowStaffSelection.ToString())}");
 }
Пример #10
0
 public void MergeFrom(Property other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     if (other.checkinTimeOfDay_ != null)
     {
         if (checkinTimeOfDay_ == null)
         {
             checkinTimeOfDay_ = new global::Google.Protobuf.WellKnownTypes.Duration();
         }
         CheckinTimeOfDay.MergeFrom(other.CheckinTimeOfDay);
     }
     if (other.checkOutTimeOfDay_ != null)
     {
         if (checkOutTimeOfDay_ == null)
         {
             checkOutTimeOfDay_ = new global::Google.Protobuf.WellKnownTypes.Duration();
         }
         CheckOutTimeOfDay.MergeFrom(other.CheckOutTimeOfDay);
     }
     if (other.rolloverTimeOfDay_ != null)
     {
         if (rolloverTimeOfDay_ == null)
         {
             rolloverTimeOfDay_ = new global::Google.Protobuf.WellKnownTypes.Duration();
         }
         RolloverTimeOfDay.MergeFrom(other.RolloverTimeOfDay);
     }
     if (other.AllowedEarlyCheckinHours != 0)
     {
         AllowedEarlyCheckinHours = other.AllowedEarlyCheckinHours;
     }
     if (other.IifDocnumPrefix.Length != 0)
     {
         IifDocnumPrefix = other.IifDocnumPrefix;
     }
     if (other.IifCustomerName.Length != 0)
     {
         IifCustomerName = other.IifCustomerName;
     }
     if (other.checkinDeposit_ != null)
     {
         if (checkinDeposit_ == null)
         {
             checkinDeposit_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         CheckinDeposit.MergeFrom(other.CheckinDeposit);
     }
     if (other.lastRevenueAccrualStart_ != null)
     {
         if (lastRevenueAccrualStart_ == null)
         {
             lastRevenueAccrualStart_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         LastRevenueAccrualStart.MergeFrom(other.LastRevenueAccrualStart);
     }
     if (other.lastDateHkRolloverRan_ != null)
     {
         if (lastDateHkRolloverRan_ == null)
         {
             lastDateHkRolloverRan_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         LastDateHkRolloverRan.MergeFrom(other.LastDateHkRolloverRan);
     }
     if (other.Address1.Length != 0)
     {
         Address1 = other.Address1;
     }
     if (other.Address2.Length != 0)
     {
         Address2 = other.Address2;
     }
     if (other.City.Length != 0)
     {
         City = other.City;
     }
     if (other.State.Length != 0)
     {
         State = other.State;
     }
     if (other.Zip.Length != 0)
     {
         Zip = other.Zip;
     }
     if (other.PhoneNumber.Length != 0)
     {
         PhoneNumber = other.PhoneNumber;
     }
     if (other.cardMerchant_ != null)
     {
         if (cardMerchant_ == null)
         {
             cardMerchant_ = new global::HOLMS.Types.Money.Cards.CardMerchantIndicator();
         }
         CardMerchant.MergeFrom(other.CardMerchant);
     }
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.maximumAuthorizationAmount_ != null)
     {
         if (maximumAuthorizationAmount_ == null)
         {
             maximumAuthorizationAmount_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         MaximumAuthorizationAmount.MergeFrom(other.MaximumAuthorizationAmount);
     }
     if (other.DefaultStayLength != 0)
     {
         DefaultStayLength = other.DefaultStayLength;
     }
     if (other.Website.Length != 0)
     {
         Website = other.Website;
     }
     if (other.ReservationEmail.Length != 0)
     {
         ReservationEmail = other.ReservationEmail;
     }
     if (other.FaxNumber.Length != 0)
     {
         FaxNumber = other.FaxNumber;
     }
     if (other.BookingPrefix.Length != 0)
     {
         BookingPrefix = other.BookingPrefix;
     }
     if (other.VoidAuthorizationsAfterDays != 0)
     {
         VoidAuthorizationsAfterDays = other.VoidAuthorizationsAfterDays;
     }
     if (other.NoShowDelayHours != 0)
     {
         NoShowDelayHours = other.NoShowDelayHours;
     }
 }
 public void MergeFrom(CancelledReservation other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.BookingId.Length != 0)
     {
         BookingId = other.BookingId;
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     if (other.guest_ != null)
     {
         if (guest_ == null)
         {
             guest_ = new global::HOLMS.Types.CRM.Guests.Guest();
         }
         Guest.MergeFrom(other.Guest);
     }
     if (other.dateRange_ != null)
     {
         if (dateRange_ == null)
         {
             dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange();
         }
         DateRange.MergeFrom(other.DateRange);
     }
     if (other.NumberAdults != 0)
     {
         NumberAdults = other.NumberAdults;
     }
     if (other.NumberChildren != 0)
     {
         NumberChildren = other.NumberChildren;
     }
     if (other.roomType_ != null)
     {
         if (roomType_ == null)
         {
             roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomType();
         }
         RoomType.MergeFrom(other.RoomType);
     }
     additionalGuests_.Add(other.additionalGuests_);
     if (other.TaxExempt != false)
     {
         TaxExempt = other.TaxExempt;
     }
     if (other.cancellationPenaltyApplied_ != null)
     {
         if (cancellationPenaltyApplied_ == null)
         {
             cancellationPenaltyApplied_ = new global::HOLMS.Types.Primitive.MonetaryAmount();
         }
         CancellationPenaltyApplied.MergeFrom(other.CancellationPenaltyApplied);
     }
     if (other.CancellationReason.Length != 0)
     {
         CancellationReason = other.CancellationReason;
     }
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.CancellationPolicy();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.RequestingParty.Length != 0)
     {
         RequestingParty = other.RequestingParty;
     }
     if (other.cancellationDate_ != null)
     {
         if (cancellationDate_ == null)
         {
             cancellationDate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         CancellationDate.MergeFrom(other.CancellationDate);
     }
     if (other.CancellationNumber != 0L)
     {
         CancellationNumber = other.CancellationNumber;
     }
     activeTags_.Add(other.activeTags_);
 }
 public void MergeFrom(ReservationSummary other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.BookingId.Length != 0)
     {
         BookingId = other.BookingId;
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     if (other.guest_ != null)
     {
         if (guest_ == null)
         {
             guest_ = new global::HOLMS.Types.CRM.Guests.Guest();
         }
         Guest.MergeFrom(other.Guest);
     }
     if (other.dateRange_ != null)
     {
         if (dateRange_ == null)
         {
             dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange();
         }
         DateRange.MergeFrom(other.DateRange);
     }
     if (other.roomType_ != null)
     {
         if (roomType_ == null)
         {
             roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomType();
         }
         RoomType.MergeFrom(other.RoomType);
     }
     if (other.GuaranteeStatus != 0)
     {
         GuaranteeStatus = other.GuaranteeStatus;
     }
     if (other.tenancy_ != null)
     {
         if (tenancy_ == null)
         {
             tenancy_ = new global::HOLMS.Types.IAM.TenancyIndicator();
         }
         Tenancy.MergeFrom(other.Tenancy);
     }
     if (other.property_ != null)
     {
         if (property_ == null)
         {
             property_ = new global::HOLMS.Types.TenancyConfig.Indicators.PropertyIndicator();
         }
         Property.MergeFrom(other.Property);
     }
     if (other.Channel != 0)
     {
         Channel = other.Channel;
     }
     if (other.VehiclePlateInformation.Length != 0)
     {
         VehiclePlateInformation = other.VehiclePlateInformation;
     }
     if (other.CurrentOccupiedRoomNumber.Length != 0)
     {
         CurrentOccupiedRoomNumber = other.CurrentOccupiedRoomNumber;
     }
     if (other.currentOccupiedRoom_ != null)
     {
         if (currentOccupiedRoom_ == null)
         {
             currentOccupiedRoom_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator();
         }
         CurrentOccupiedRoom.MergeFrom(other.CurrentOccupiedRoom);
     }
     if (other.TerminalOccupiedRoomNumber.Length != 0)
     {
         TerminalOccupiedRoomNumber = other.TerminalOccupiedRoomNumber;
     }
     if (other.terminalOccupiedRoom_ != null)
     {
         if (terminalOccupiedRoom_ == null)
         {
             terminalOccupiedRoom_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator();
         }
         TerminalOccupiedRoom.MergeFrom(other.TerminalOccupiedRoom);
     }
     if (other.NumberAdults != 0)
     {
         NumberAdults = other.NumberAdults;
     }
     if (other.NumberChildren != 0)
     {
         NumberChildren = other.NumberChildren;
     }
     activeTags_.Add(other.activeTags_);
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.hkTimePreference_ != null)
     {
         if (hkTimePreference_ == null)
         {
             hkTimePreference_ = new global::HOLMS.Types.Operations.Housekeeping.HousekeepingTime();
         }
         HkTimePreference.MergeFrom(other.HkTimePreference);
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             createdAt_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.OutstandingIssuedRoomKeys != 0)
     {
         OutstandingIssuedRoomKeys = other.OutstandingIssuedRoomKeys;
     }
     if (other.OptaRoomStayIndex != 0)
     {
         OptaRoomStayIndex = other.OptaRoomStayIndex;
     }
     if (other.ReservationIdFromChannel.Length != 0)
     {
         ReservationIdFromChannel = other.ReservationIdFromChannel;
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (BookingId.Length != 0)
            {
                hash ^= BookingId.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (guest_ != null)
            {
                hash ^= Guest.GetHashCode();
            }
            if (dateRange_ != null)
            {
                hash ^= DateRange.GetHashCode();
            }
            if (roomType_ != null)
            {
                hash ^= RoomType.GetHashCode();
            }
            if (GuaranteeStatus != 0)
            {
                hash ^= GuaranteeStatus.GetHashCode();
            }
            if (tenancy_ != null)
            {
                hash ^= Tenancy.GetHashCode();
            }
            if (property_ != null)
            {
                hash ^= Property.GetHashCode();
            }
            if (Channel != 0)
            {
                hash ^= Channel.GetHashCode();
            }
            if (VehiclePlateInformation.Length != 0)
            {
                hash ^= VehiclePlateInformation.GetHashCode();
            }
            if (CurrentOccupiedRoomNumber.Length != 0)
            {
                hash ^= CurrentOccupiedRoomNumber.GetHashCode();
            }
            if (currentOccupiedRoom_ != null)
            {
                hash ^= CurrentOccupiedRoom.GetHashCode();
            }
            if (TerminalOccupiedRoomNumber.Length != 0)
            {
                hash ^= TerminalOccupiedRoomNumber.GetHashCode();
            }
            if (terminalOccupiedRoom_ != null)
            {
                hash ^= TerminalOccupiedRoom.GetHashCode();
            }
            if (NumberAdults != 0)
            {
                hash ^= NumberAdults.GetHashCode();
            }
            if (NumberChildren != 0)
            {
                hash ^= NumberChildren.GetHashCode();
            }
            hash ^= activeTags_.GetHashCode();
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (hkTimePreference_ != null)
            {
                hash ^= HkTimePreference.GetHashCode();
            }
            if (createdAt_ != null)
            {
                hash ^= CreatedAt.GetHashCode();
            }
            if (OutstandingIssuedRoomKeys != 0)
            {
                hash ^= OutstandingIssuedRoomKeys.GetHashCode();
            }
            if (OptaRoomStayIndex != 0)
            {
                hash ^= OptaRoomStayIndex.GetHashCode();
            }
            if (ReservationIdFromChannel.Length != 0)
            {
                hash ^= ReservationIdFromChannel.GetHashCode();
            }
            return(hash);
        }
 public void MergeFrom(CompleteOpenReservation other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.BookingId.Length != 0)
     {
         BookingId = other.BookingId;
     }
     if (other.State != 0)
     {
         State = other.State;
     }
     if (other.guest_ != null)
     {
         if (guest_ == null)
         {
             guest_ = new global::HOLMS.Types.CRM.Guests.Guest();
         }
         Guest.MergeFrom(other.Guest);
     }
     if (other.dateRange_ != null)
     {
         if (dateRange_ == null)
         {
             dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange();
         }
         DateRange.MergeFrom(other.DateRange);
     }
     if (other.NumberAdults != 0)
     {
         NumberAdults = other.NumberAdults;
     }
     if (other.NumberChildren != 0)
     {
         NumberChildren = other.NumberChildren;
     }
     if (other.roomType_ != null)
     {
         if (roomType_ == null)
         {
             roomType_ = new global::HOLMS.Types.Supply.RoomTypes.RoomType();
         }
         RoomType.MergeFrom(other.RoomType);
     }
     additionalGuests_.Add(other.additionalGuests_);
     if (other.TaxExempt != false)
     {
         TaxExempt = other.TaxExempt;
     }
     if (other.hkTimePreference_ != null)
     {
         if (hkTimePreference_ == null)
         {
             hkTimePreference_ = new global::HOLMS.Types.Operations.Housekeeping.HousekeepingTime();
         }
         HkTimePreference.MergeFrom(other.HkTimePreference);
     }
     if (other.VehiclePlateInformation.Length != 0)
     {
         VehiclePlateInformation = other.VehiclePlateInformation;
     }
     if (other.CurrentOccupiedRoomNumber.Length != 0)
     {
         CurrentOccupiedRoomNumber = other.CurrentOccupiedRoomNumber;
     }
     if (other.currentOccupiedRoom_ != null)
     {
         if (currentOccupiedRoom_ == null)
         {
             currentOccupiedRoom_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator();
         }
         CurrentOccupiedRoom.MergeFrom(other.CurrentOccupiedRoom);
     }
     if (other.TerminalOccupiedRoomNumber.Length != 0)
     {
         TerminalOccupiedRoomNumber = other.TerminalOccupiedRoomNumber;
     }
     if (other.terminalOccupiedRoom_ != null)
     {
         if (terminalOccupiedRoom_ == null)
         {
             terminalOccupiedRoom_ = new global::HOLMS.Types.Operations.Rooms.RoomIndicator();
         }
         TerminalOccupiedRoom.MergeFrom(other.TerminalOccupiedRoom);
     }
     if (other.FirstNightAssignedRoom.Length != 0)
     {
         FirstNightAssignedRoom = other.FirstNightAssignedRoom;
     }
     activeTags_.Add(other.activeTags_);
     if (other.ChannelManagerId.Length != 0)
     {
         ChannelManagerId = other.ChannelManagerId;
     }
     if (other.SourceChannelId.Length != 0)
     {
         SourceChannelId = other.SourceChannelId;
     }
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.ReservationIdFromChannel.Length != 0)
     {
         ReservationIdFromChannel = other.ReservationIdFromChannel;
     }
     if (other.RushReservationIdFromChannel.Length != 0)
     {
         RushReservationIdFromChannel = other.RushReservationIdFromChannel;
     }
     if (other.SourceIndirectChannel.Length != 0)
     {
         SourceIndirectChannel = other.SourceIndirectChannel;
     }
     if (other.reservationSource_ != null)
     {
         if (reservationSource_ == null)
         {
             reservationSource_ = new global::HOLMS.Types.TenancyConfig.ReservationSource();
         }
         ReservationSource.MergeFrom(other.ReservationSource);
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (BookingId.Length != 0)
            {
                hash ^= BookingId.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (guest_ != null)
            {
                hash ^= Guest.GetHashCode();
            }
            if (dateRange_ != null)
            {
                hash ^= DateRange.GetHashCode();
            }
            if (NumberAdults != 0)
            {
                hash ^= NumberAdults.GetHashCode();
            }
            if (NumberChildren != 0)
            {
                hash ^= NumberChildren.GetHashCode();
            }
            if (roomType_ != null)
            {
                hash ^= RoomType.GetHashCode();
            }
            hash ^= additionalGuests_.GetHashCode();
            if (TaxExempt != false)
            {
                hash ^= TaxExempt.GetHashCode();
            }
            if (hkTimePreference_ != null)
            {
                hash ^= HkTimePreference.GetHashCode();
            }
            if (VehiclePlateInformation.Length != 0)
            {
                hash ^= VehiclePlateInformation.GetHashCode();
            }
            if (CurrentOccupiedRoomNumber.Length != 0)
            {
                hash ^= CurrentOccupiedRoomNumber.GetHashCode();
            }
            if (currentOccupiedRoom_ != null)
            {
                hash ^= CurrentOccupiedRoom.GetHashCode();
            }
            if (TerminalOccupiedRoomNumber.Length != 0)
            {
                hash ^= TerminalOccupiedRoomNumber.GetHashCode();
            }
            if (terminalOccupiedRoom_ != null)
            {
                hash ^= TerminalOccupiedRoom.GetHashCode();
            }
            if (FirstNightAssignedRoom.Length != 0)
            {
                hash ^= FirstNightAssignedRoom.GetHashCode();
            }
            hash ^= activeTags_.GetHashCode();
            if (ChannelManagerId.Length != 0)
            {
                hash ^= ChannelManagerId.GetHashCode();
            }
            if (SourceChannelId.Length != 0)
            {
                hash ^= SourceChannelId.GetHashCode();
            }
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (ReservationIdFromChannel.Length != 0)
            {
                hash ^= ReservationIdFromChannel.GetHashCode();
            }
            if (RushReservationIdFromChannel.Length != 0)
            {
                hash ^= RushReservationIdFromChannel.GetHashCode();
            }
            if (SourceIndirectChannel.Length != 0)
            {
                hash ^= SourceIndirectChannel.GetHashCode();
            }
            if (reservationSource_ != null)
            {
                hash ^= ReservationSource.GetHashCode();
            }
            return(hash);
        }
Пример #16
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (TaxExempt != false)
            {
                hash ^= TaxExempt.GetHashCode();
            }
            if (TaxId.Length != 0)
            {
                hash ^= TaxId.GetHashCode();
            }
            if (GroupPaysLodging != false)
            {
                hash ^= GroupPaysLodging.GetHashCode();
            }
            if (GroupPaysIncidentals != false)
            {
                hash ^= GroupPaysIncidentals.GetHashCode();
            }
            if (AdditionalNotes.Length != 0)
            {
                hash ^= AdditionalNotes.GetHashCode();
            }
            if (CustomerBookingId.Length != 0)
            {
                hash ^= CustomerBookingId.GetHashCode();
            }
            if (dateRange_ != null)
            {
                hash ^= DateRange.GetHashCode();
            }
            if (rateSchedule_ != null)
            {
                hash ^= RateSchedule.GetHashCode();
            }
            if (group_ != null)
            {
                hash ^= Group.GetHashCode();
            }
            if (confirmationTemplateId_ != null)
            {
                hash ^= ConfirmationTemplateId.GetHashCode();
            }
            if (bookingMethod_ != null)
            {
                hash ^= BookingMethod.GetHashCode();
            }
            if (arrivalTemplateId_ != null)
            {
                hash ^= ArrivalTemplateId.GetHashCode();
            }
            if (reservationSourceId_ != null)
            {
                hash ^= ReservationSourceId.GetHashCode();
            }
            if (travelAgent_ != null)
            {
                hash ^= TravelAgent.GetHashCode();
            }
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (GroupName.Length != 0)
            {
                hash ^= GroupName.GetHashCode();
            }
            return(hash);
        }
Пример #17
0
 public void MergeFrom(GroupBooking other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.GroupBookingIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     if (other.TaxExempt != false)
     {
         TaxExempt = other.TaxExempt;
     }
     if (other.TaxId.Length != 0)
     {
         TaxId = other.TaxId;
     }
     if (other.GroupPaysLodging != false)
     {
         GroupPaysLodging = other.GroupPaysLodging;
     }
     if (other.GroupPaysIncidentals != false)
     {
         GroupPaysIncidentals = other.GroupPaysIncidentals;
     }
     if (other.AdditionalNotes.Length != 0)
     {
         AdditionalNotes = other.AdditionalNotes;
     }
     if (other.CustomerBookingId.Length != 0)
     {
         CustomerBookingId = other.CustomerBookingId;
     }
     if (other.dateRange_ != null)
     {
         if (dateRange_ == null)
         {
             dateRange_ = new global::HOLMS.Types.Primitive.PbInclusiveOpsdateRange();
         }
         DateRange.MergeFrom(other.DateRange);
     }
     if (other.rateSchedule_ != null)
     {
         if (rateSchedule_ == null)
         {
             rateSchedule_ = new global::HOLMS.Types.Supply.RateScheduleIndicator();
         }
         RateSchedule.MergeFrom(other.RateSchedule);
     }
     if (other.group_ != null)
     {
         if (group_ == null)
         {
             group_ = new global::HOLMS.Types.CRM.Groups.GroupIndicator();
         }
         Group.MergeFrom(other.Group);
     }
     if (other.confirmationTemplateId_ != null)
     {
         if (confirmationTemplateId_ == null)
         {
             confirmationTemplateId_ = new global::HOLMS.Types.Primitive.Uuid();
         }
         ConfirmationTemplateId.MergeFrom(other.ConfirmationTemplateId);
     }
     if (other.bookingMethod_ != null)
     {
         if (bookingMethod_ == null)
         {
             bookingMethod_ = new global::HOLMS.Types.TenancyConfig.Indicators.GroupBookingMethodIndicator();
         }
         BookingMethod.MergeFrom(other.BookingMethod);
     }
     if (other.arrivalTemplateId_ != null)
     {
         if (arrivalTemplateId_ == null)
         {
             arrivalTemplateId_ = new global::HOLMS.Types.Primitive.Uuid();
         }
         ArrivalTemplateId.MergeFrom(other.ArrivalTemplateId);
     }
     if (other.reservationSourceId_ != null)
     {
         if (reservationSourceId_ == null)
         {
             reservationSourceId_ = new global::HOLMS.Types.Primitive.Uuid();
         }
         ReservationSourceId.MergeFrom(other.ReservationSourceId);
     }
     if (other.travelAgent_ != null)
     {
         if (travelAgent_ == null)
         {
             travelAgent_ = new global::HOLMS.Types.Booking.Indicators.TravelAgentIndicator();
         }
         TravelAgent.MergeFrom(other.TravelAgent);
     }
     if (other.cancellationPolicy_ != null)
     {
         if (cancellationPolicy_ == null)
         {
             cancellationPolicy_ = new global::HOLMS.Types.Booking.Indicators.CancellationPolicyIndicator();
         }
         CancellationPolicy.MergeFrom(other.CancellationPolicy);
     }
     if (other.GroupName.Length != 0)
     {
         GroupName = other.GroupName;
     }
 }
Пример #18
0
        /// <summary>
        /// Validates cancellation policy clauses
        /// </summary>
        /// <param name="cancellationPolicyClause"></param>
        /// <returns>returns results based on validation</returns>
        //private bool ValidatePolicyClause(CancellationPolicyClauses cancellationPolicyClause)
        //{
        //    int cancellationChrgesId = cancellationPolicyClause.CancellationChargesId;

        //    var list = iCancellationPolicyClausesConnectionLibrary.GetListByPredicate(p => p.CancellationPolicyId == cancellationPolicyClause.CancellationPolicyId && p.CancellationChargesId == cancellationChrgesId).Result.Result;

        //    int daysBeforeArrival = cancellationPolicyClause.DaysBeforeArrival;
        //    decimal percentage = cancellationPolicyClause.PercentageCharge;

        //    List<CancellationPolicyClauses> clist = list.OrderBy(p => p.DaysBeforeArrival).ToList();
        //    CancellationPolicyClauses c1 = null, c2 = null;
        //    foreach (var item in clist)
        //    {

        //        if (daysBeforeArrival > item.DaysBeforeArrival)
        //        {
        //            c1 = item;
        //            continue;
        //        }
        //        else
        //        {
        //            c2 = item;
        //            break;
        //        }
        //    }
        //    if (c1 != null && c2 != null)
        //    {
        //        if (c1.PercentageCharge > percentage && percentage > c2.PercentageCharge)
        //        {
        //            return true;
        //        }
        //        else return false;
        //    }
        //    else if (c1 == null)
        //    {
        //        if (c2.PercentageCharge < percentage)
        //            return true;
        //        else return false;
        //    }
        //    else if (c2 == null)
        //    {
        //        if (c1.PercentageCharge > percentage)
        //            return true;
        //        else return false;
        //    }
        //    else
        //    {
        //        return false;
        //    }
        //}

        /// <summary>
        /// Updates Cancellation Policy
        /// </summary>
        /// <param name="cancellationPolicyViewModel"></param>
        /// <returns>updated cancellation policy id</returns>
        private async Task <BaseResult <CancellationPolicy> > UpdateCancellationPolicy(CancellationPolicyViewModel cancellationPolicyViewModel)
        {
            var result = new BaseResult <CancellationPolicy>();

            result.Result = new CancellationPolicy();

            if (cancellationPolicyViewModel.ObjectState == ObjectState.Modified)
            {
                var cancellationPolicyDb = this.iCancellationPolicyConnectionLibrary.GetListByPredicate(p => p.Id == cancellationPolicyViewModel.CancellationPolicyId &&
                                                                                                        p.HotelId == cancellationPolicyViewModel.HotelId && p.IsDeleted == false).Result.Result.FirstOrDefault();

                /// for deleting clauses in case it is changed from general/nrf to flexible

                if (cancellationPolicyDb.CancellationPolicyTypeId == 2 && cancellationPolicyViewModel.CancellationPolicyTypeId != 2)
                {
                    var list    = new List <CancellationPolicyClauses>();
                    var clauses = this.iCancellationPolicyClausesConnectionLibrary.GetListByPredicate(p => p.CancellationPolicyId == cancellationPolicyDb.Id && p.IsDeleted == false);
                    foreach (var item in clauses.Result.Result)
                    {
                        item.IsDeleted = true;
                        list.Add(item);
                    }
                    await this.iCancellationPolicyClausesConnectionLibrary.UpdateEntityList(list).ConfigureAwait(false);
                }

                /// for saving main cancellation entity

                if (cancellationPolicyDb != null)
                {
                    Func <int, int?> GetchargeId = (id) => (cancellationPolicyViewModel.CancellationPolicyTypeId == (int)Enums.CancellationPolicyTypeEnumConstant.Flexible) ? cancellationPolicyViewModel.CancellationPolicyClausesViewModelList.CancellationClauseChargeId : null;
                    var cancellationPolicy       = new CancellationPolicy()
                    {
                        Id = cancellationPolicyDb.Id,
                        CancellationChargesId    = GetchargeId(cancellationPolicyDb.CancellationPolicyTypeId),
                        CancellationPolicyTypeId = cancellationPolicyViewModel.CancellationPolicyTypeId,
                        HotelId                     = cancellationPolicyDb.HotelId,
                        IsActive                    = cancellationPolicyViewModel.IsActive,
                        IsDeleted                   = cancellationPolicyViewModel.IsDeleted,
                        IsNoShowCharges             = cancellationPolicyViewModel.IsNoShowCharges,
                        Name                        = cancellationPolicyViewModel.Name,
                        NoShowCancellationChargesId = cancellationPolicyViewModel.NoShowCancellationChargesId
                    };

                    var updateResult = await iCancellationPolicyConnectionLibrary.UpdateEntityByDapper(cancellationPolicy).ConfigureAwait(false);

                    if (updateResult.IsError || updateResult.ExceptionMessage != null)
                    {
                        result.IsError          = true;
                        result.ExceptionMessage = updateResult.ExceptionMessage;
                        return(result);
                    }
                    if (updateResult == null)
                    {
                        result = null;
                    }
                    return(result);
                }
                else
                {
                    return(result);
                }
            }
            else
            {
                return(result);
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (BookingId.Length != 0)
            {
                hash ^= BookingId.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (guest_ != null)
            {
                hash ^= Guest.GetHashCode();
            }
            if (dateRange_ != null)
            {
                hash ^= DateRange.GetHashCode();
            }
            if (NumberAdults != 0)
            {
                hash ^= NumberAdults.GetHashCode();
            }
            if (NumberChildren != 0)
            {
                hash ^= NumberChildren.GetHashCode();
            }
            if (roomType_ != null)
            {
                hash ^= RoomType.GetHashCode();
            }
            hash ^= additionalGuests_.GetHashCode();
            if (TaxExempt != false)
            {
                hash ^= TaxExempt.GetHashCode();
            }
            if (cancellationPenaltyApplied_ != null)
            {
                hash ^= CancellationPenaltyApplied.GetHashCode();
            }
            if (CancellationReason.Length != 0)
            {
                hash ^= CancellationReason.GetHashCode();
            }
            if (cancellationPolicy_ != null)
            {
                hash ^= CancellationPolicy.GetHashCode();
            }
            if (RequestingParty.Length != 0)
            {
                hash ^= RequestingParty.GetHashCode();
            }
            if (cancellationDate_ != null)
            {
                hash ^= CancellationDate.GetHashCode();
            }
            if (CancellationNumber != 0L)
            {
                hash ^= CancellationNumber.GetHashCode();
            }
            hash ^= activeTags_.GetHashCode();
            return(hash);
        }
Пример #20
0
        public static CancellationPolicy AutomapperCancellationPolicy(CancellationPolicyViewModel viewModel, CancellationPolicy model)
        {
            var modelMapped = AutoMapper.Mapper.Map <CancellationPolicy>(viewModel);

            return(modelMapped);
        }
Пример #21
0
 /// <summary>
 /// ResolveRemainingParamters
 /// </summary>
 /// <param name="destination"></param>
 /// <param name="source"></param>
 public static void ResolveRemainingParamters(CancellationPolicy destination, CancellationPolicy source)
 {
     destination.HotelId = source.HotelId;
 }
Пример #22
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);
        }