예제 #1
0
        public bool AddPackage(ref ShippedPackageInformation p)
        {
            bool result = false;

            _Packages.Add(p);
            result = true;

            return(result);
        }
예제 #2
0
        private static void ParseShipAcceptResponsePackages(ref ShipAcceptResponse res, ref XmlNodeList packages)
        {

            foreach (XmlNode node in packages)
            {
                try
                {
                    XmlDocument xp = new XmlDocument();
                    xp.LoadXml(node.OuterXml);

                    ShippedPackageInformation _package = new ShippedPackageInformation();
                    _package.TrackingNumber = XmlTools.XPathToString(ref xp, "PackageResults/TrackingNumber");
                    _package.Base64Image = XmlTools.XPathToString(ref xp, "PackageResults/LabelImage/GraphicImage");
                    _package.Base64Html = XmlTools.XPathToString(ref xp, "PackageResults/LabelImage/HTMLImage");
                    _package.Base64Signature = XmlTools.XPathToString(ref xp, "PackageResults/InternationalSignatureGraphicImage");
                    _package.LabelFormat = XmlTools.XPathToLabelFormat(ref xp, "PackageResults/LabelImage/LabelImageFormat/Code");
                    _package.ServiceOptionsCharge = XmlTools.XPathToDecimal(ref xp, "PackageResults/ServiceOptionsCharge/MonetaryValue");
                    _package.ServiceOptionsChargeCurrency = XmlTools.XPathToCurrencyCode(ref xp, "PackageResults/ServiceOptionsCharge/CurrencyCode");
                    res.AddPackage(ref _package);
                }

                catch
                {

                }
            }
        }
예제 #3
0
        public bool AddPackage(ref ShippedPackageInformation p)
        {
            bool result = false;

            _Packages.Add(p);
            result = true;

            return result;
        }