public static List <CarErrorData> expCarErrorDataGenerator(CarSupplyConnectivityReserveRequest request
                                                                   , CarSupplyConnectivityReserveResponse response
                                                                   , TestDataErrHandle testDataErrHandle
                                                                   , string sourceName = "SCS", string sourceId = "1", string messageType = "Reserve")
        {
            List <CarErrorData> expDatas = new List <CarErrorData>();

            string[]       errors         = testDataErrHandle.errorDesc_GDS.Split(',');
            PointOfSaleKey pointOfSaleKey = new PointOfSaleKey()
            {
                JurisdictionCountryCode = request.PointOfSaleKey.JurisdictionCountryCode,
                CompanyCode             = request.PointOfSaleKey.CompanyCode,
                ManagementUnitCode      = request.PointOfSaleKey.ManagementUnitCode,
            };

            CarPickupLocationKey pickupLocationkey = new CarPickupLocationKey()
            {
                LocationCode            = request.CarProduct.CarInventoryKey.CarCatalogKey.CarPickupLocationKey.LocationCode,
                CarLocationCategoryCode = request.CarProduct.CarInventoryKey.CarCatalogKey.CarPickupLocationKey.CarLocationCategoryCode,
                SupplierRawText         = request.CarProduct.CarInventoryKey.CarCatalogKey.CarPickupLocationKey.SupplierRawText,
            };

            foreach (string error in errors)
            {
                CarErrorData expData = new CarErrorData()
                {
                    sourceName      = sourceName,
                    sourceId        = sourceId,
                    pointOfSaleKey  = pointOfSaleKey,
                    supplierId      = request.CarProduct.CarInventoryKey.CarCatalogKey.VendorSupplierID.ToString(),
                    errorText       = error,
                    messageType     = messageType,
                    carCategoryCode = request.CarProduct.CarInventoryKey.CarCatalogKey.CarVehicle.CarCategoryCode.ToString(),
                    carTypeCode     = request.CarProduct.CarInventoryKey.CarCatalogKey.CarVehicle.CarTypeCode.ToString(),
                    pickupLocation  = pickupLocationkey,
                };
                expDatas.Add(expData);
            }

            return(expDatas);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get specific column value based on POS, e.g: CarWorldspanSCS..PoSToWorldspanDefaultSegmentMap
        /// </summary>
        /// <param name="jurisdictionCode"></param>
        /// <param name="companyCode"></param>
        /// <param name="managementUnitCode"></param>
        /// <param name="columnName"></param>
        /// <returns></returns>
        public string POSValueGet(PointOfSaleKey posKey, string columnName)
        {
            ConfigurationSettingDataTbl config = new ConfigurationSettingDataTbl(jCode: posKey.JurisdictionCountryCode, cCode: posKey.CompanyCode, mUnitCode: posKey.ManagementUnitCode);

            return(ColumnValueGet(config, columnName));
        }