예제 #1
0
        //Where Used: TransactionFeeClientFeeGroup
        public TransactionFeeVM IsTransactionFeeAir(int transactionFeeId)
        {
            HierarchyDC db = new HierarchyDC(Settings.getConnectionString());

            TransactionFeeAir transactionFeeAir = new TransactionFeeAir();
            PolicyRouting     policyRouting     = new PolicyRouting();

            TransactionFeeAirRepository transactionFeeAirRepository = new TransactionFeeAirRepository();

            transactionFeeAir = transactionFeeAirRepository.GetItem(transactionFeeId);

            PolicyRoutingRepository policyRoutingRepository = new PolicyRoutingRepository();

            policyRouting = policyRoutingRepository.GetPolicyRouting((int)transactionFeeAir.PolicyRoutingId);
            policyRoutingRepository.EditPolicyRouting(policyRouting);

            TransactionFeeVM transactionFeeVM = new TransactionFeeVM();

            transactionFeeVM.TransactionFee       = transactionFeeAir;
            transactionFeeVM.Name                 = policyRouting.Name;
            transactionFeeVM.FromGlobalFlag       = policyRouting.FromGlobalFlag;
            transactionFeeVM.FromCode             = policyRouting.FromCode;
            transactionFeeVM.ToGlobalFlag         = policyRouting.ToGlobalFlag;
            transactionFeeVM.ToCode               = policyRouting.ToCode;
            transactionFeeVM.RoutingViceVersaFlag = policyRouting.RoutingViceVersaFlag;
            return(transactionFeeVM);

            /* var result = (from n in db.spDesktopDataAdmin_SelectTransactionFeeAir_v1(transactionFeeId)
             *             select
             *            new TransactionFeeAir
             *                 {
             *                     TransactionFeeId = n.TransactionFeeId,
             *                     ProductName = n.ProductName,
             *                     TransactionFeeDescription = n.TransactionFeeDescription,
             *                     TravelIndicatorDescription = n.TravelIndicatorDescription,
             *                     BookingSourceDescription = n.BookingSourceDescription,
             *                     BookingOriginationDescription = n.BookingOriginationDescription,
             *                     ChargeTypeDescription = n.ChargeTypeDescription,
             *                     TransactionTypeCode = n.TransactionTypeCode,
             *                     FeeCategory = n.FeeCategory,
             *                     TravelerClassCode = n.TravelerClassCode,
             *                     SupplierName = n.SupplierName,
             *                     MinimumFeeCategoryQuantity = n.MinimumFeeCategoryQuantity,
             *                     MaximumFeeCategoryQuantity = n.MaximumFeeCategoryQuantity,
             *                     MinimumTicketPrice = n.MinimumTicketPrice,
             *                     MaximumTicketPrice = n.MaximumTicketPrice,
             *                     TicketPriceCurrencyCode = n.TicketPriceCurrencyCode,
             *                     IncursGSTFlag = n.IncursGSTFlag,
             *                     TripTypeClassificationDescription = n.TripTypeClassificationDescription,
             *                     EnabledDate = n.EnabledDate,
             *                     ExpiryDate = n.ExpiryDate,
             *                     FeeAmount = n.FeeAmount,
             *                     FeePercent = n.FeePercent,
             *                     FeeCurrencyCode = n.FeeCurrencyCode,
             *                     PolicyRoutingId = n.PolicyRoutingId
             *                 }).FirstOrDefault();
             * return result;*/
        }