private void AddPartialPackage(int nrBoxes, string partialBoxWeight, int valuePerPartialBox, inv_detl details, string packagingTypeCode, string currencyCode, UPSRateService.PackageType[] pkgArray)
        {
            var package       = new UPSRateService.PackageType();
            var packageWeight = new UPSRateService.PackageWeightType();

            packageWeight.Weight = partialBoxWeight;
            var uom = new UPSRateService.CodeDescriptionType();

            uom.Code        = "LBS";
            uom.Description = "pounds";
            packageWeight.UnitOfMeasurement = uom;
            package.PackageWeight           = packageWeight;

            var packageDimensions = new UPSRateService.DimensionsType();

            //packageDimensions.Height = ((int)details.CASE_HI.Value).ToString();
            //packageDimensions.Length = ((int)details.CASE_LEN.Value).ToString();
            //packageDimensions.Width = ((int)details.CASE_WT.Value).ToString();

            packageDimensions.Height = "0";
            packageDimensions.Length = "0";
            packageDimensions.Width  = "0";

            var packDimType = new UPSRateService.CodeDescriptionType();

            packDimType.Code                    = "IN";
            packDimType.Description             = "Inches";
            packageDimensions.UnitOfMeasurement = packDimType;
            package.Dimensions                  = packageDimensions;

            var packageServiceOptions = new UPSRateService.PackageServiceOptionsType();
            var insuredValue          = new UPSRateService.InsuredValueType();

            insuredValue.CurrencyCode           = currencyCode;
            insuredValue.MonetaryValue          = valuePerPartialBox.ToString();
            packageServiceOptions.DeclaredValue = insuredValue;
            package.PackageServiceOptions       = packageServiceOptions;

            var packType = new UPSRateService.CodeDescriptionType();

            packType.Code         = packagingTypeCode;
            package.PackagingType = packType;
            pkgArray[nrBoxes - 1] = package;
        }
        private void AddPartialPackage(int nrBoxes, string partialBoxWeight, int valuePerPartialBox, inv_detl details, string packagingTypeCode, string currencyCode, UPSRateService.PackageType[] pkgArray)
        {
            var package = new UPSRateService.PackageType();
            var packageWeight = new UPSRateService.PackageWeightType();
            packageWeight.Weight = partialBoxWeight;
            var uom = new UPSRateService.CodeDescriptionType();
            uom.Code = "LBS";
            uom.Description = "pounds";
            packageWeight.UnitOfMeasurement = uom;
            package.PackageWeight = packageWeight;

            var packageDimensions = new UPSRateService.DimensionsType();
            //packageDimensions.Height = ((int)details.CASE_HI.Value).ToString();
            //packageDimensions.Length = ((int)details.CASE_LEN.Value).ToString();
            //packageDimensions.Width = ((int)details.CASE_WT.Value).ToString();

            packageDimensions.Height = "0";
            packageDimensions.Length = "0";
            packageDimensions.Width = "0";

            var packDimType = new UPSRateService.CodeDescriptionType();
            packDimType.Code = "IN";
            packDimType.Description = "Inches";
            packageDimensions.UnitOfMeasurement = packDimType;
            package.Dimensions = packageDimensions;

            var packageServiceOptions = new UPSRateService.PackageServiceOptionsType();
            var insuredValue = new UPSRateService.InsuredValueType();
            insuredValue.CurrencyCode = currencyCode;
            insuredValue.MonetaryValue = valuePerPartialBox.ToString();
            packageServiceOptions.DeclaredValue = insuredValue;
            package.PackageServiceOptions = packageServiceOptions;

            var packType = new UPSRateService.CodeDescriptionType();
            packType.Code = packagingTypeCode;
            package.PackagingType = packType;
            pkgArray[nrBoxes - 1] = package;
        }