Exemplo n.º 1
0
 public CommissionDataItem(CommissionDataItem other)
 {
     Percent          = other.Percent;
     Amount           = other.Amount;
     Currency         = other.Currency;
     IsFareCommission = other.IsFareCommission;
 }
        public override bool Equals(object obj)
        {
            var other = obj as DiscountDataItem;

            if (other == null)
            {
                return(false);
            }

            return(AuthCode == other.AuthCode && CommissionDataItem.Equals(this, other));
        }
Exemplo n.º 3
0
 public static bool Equals(CommissionDataItem item1, CommissionDataItem item2)
 {
     return(item1 == null && item2 == null ||
            item1 != null && item2 != null && item1.Equals(item2));
 }
Exemplo n.º 4
0
 public bool Equals(CommissionDataItem comm, bool checkFareCommProperty = true)
 {
     return(Equals((object)comm) && (!checkFareCommProperty || IsFareCommission == comm.IsFareCommission));
 }
Exemplo n.º 5
0
        protected virtual bool DataItemElementEquals(BasePNRDataItem other)
        {
            switch (Type)
            {
            case PNRDataItemType.Remark:
                return(Equals(Remark, other.Remark));

            case PNRDataItemType.TL:
                return(Equals(TimeLimits, other.TimeLimits));

            case PNRDataItemType.SSR:
                return(Equals(SSR, other.SSR));

            case PNRDataItemType.Commission:
                return(CommissionDataItem.Equals(Commission, other.Commission));

            case PNRDataItemType.FOP:
                return(Equals(FOPInfo, other.FOPInfo));

            case PNRDataItemType.SourceInfo:
                return(Equals(SourceInfo, other.SourceInfo));

            case PNRDataItemType.IDDocument:
                return(Equals(Document, other.Document));

            case PNRDataItemType.ContactInfo:
                return(Equals(ContactInfo, other.ContactInfo));

            case PNRDataItemType.LoyaltyCard:
                return(Equals(LoyaltyCard, other.LoyaltyCard));

            case PNRDataItemType.Meal:
                return(Equals(Meal, other.Meal));

            case PNRDataItemType.ED:
                return(Equals(ElectronicDocument, other.ElectronicDocument));

            case PNRDataItemType.PD:
                return(Equals(PaperDocument, other.PaperDocument));

            case PNRDataItemType.FE:
                return(Equals(Endorsements, other.Endorsements));

            case PNRDataItemType.Visa:
                return(Equals(Visa, other.Visa));

            case PNRDataItemType.ArrivalAddress:
                return(Equals(ArrivalAddress, other.ArrivalAddress));

            case PNRDataItemType.BookedSeat:
                return(Equals(BookedSeat, other.BookedSeat));

            case PNRDataItemType.ValidatingCompany:
                return(Equals(ValidatingCompany, other.ValidatingCompany));

            case PNRDataItemType.TourCode:
                return(Equals(TourCode, other.TourCode));

            case PNRDataItemType.Discount:
                return(Equals(Discount, other.Discount));

            case PNRDataItemType.FareSourceCode:
                return(Equals(FareSourceCode, other.FareSourceCode));

            case PNRDataItemType.AdditionalLocators:
                return(Equals(AdditionalLocators, other.AdditionalLocators));

            case PNRDataItemType.OSI:
                return(Equals(OSI, other.OSI));

            case PNRDataItemType.ReferencedBooks:
                return(Equals(ReferencedBooks, other.ReferencedBooks));

            case PNRDataItemType.FareInfo:
                return(Equals(FareInfo, other.FareInfo));

            case PNRDataItemType.DiscountDocument:
                return(Equals(DiscountDocument, other.DiscountDocument));

            case PNRDataItemType.VoucherFile:
                return(Equals(Voucher, other.Voucher));

            case PNRDataItemType.LinkedBooks:
                return(Equals(LinkedBooks, other.LinkedBooks));

            default:
                return(false);
            }
        }