public override bool Equals(object obj)
        {
            var other = obj as DiscountDataItem;

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

            return(AuthCode == other.AuthCode && CommissionDataItem.Equals(this, other));
        }
Esempio n. 2
0
 public static bool Equals(CommissionDataItem item1, CommissionDataItem item2)
 {
     return(item1 == null && item2 == null ||
            item1 != null && item2 != null && item1.Equals(item2));
 }
Esempio n. 3
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);
            }
        }