/// <summary>
        /// Convert a nettiers collection to the ws proxy collection.
        /// </summary>
        public static Nettiers.AdventureWorks.Entities.PurchaseOrderHeader Convert(Nettiers.AdventureWorks.Entities.PurchaseOrderHeader outItem, WsProxy.PurchaseOrderHeader item)
        {
            if (item != null && outItem != null)
            {
                outItem.PurchaseOrderId = item.PurchaseOrderId;
                outItem.RevisionNumber  = item.RevisionNumber;
                outItem.Status          = item.Status;
                outItem.EmployeeId      = item.EmployeeId;
                outItem.VendorId        = item.VendorId;
                outItem.ShipMethodId    = item.ShipMethodId;
                outItem.OrderDate       = item.OrderDate;
                outItem.ShipDate        = item.ShipDate;
                outItem.SubTotal        = item.SubTotal;
                outItem.TaxAmt          = item.TaxAmt;
                outItem.Freight         = item.Freight;
                outItem.TotalDue        = item.TotalDue;
                outItem.ModifiedDate    = item.ModifiedDate;

                outItem.AcceptChanges();
            }

            return(outItem);
        }
        /// <summary>
        ///     Update an existing row in the datasource.
        /// </summary>
        /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
        /// <param name="entity">Nettiers.AdventureWorks.Entities.PurchaseOrderHeader object to update.</param>
        /// <remarks></remarks>
        /// <returns>Returns true if operation is successful.</returns>
        public override bool Update(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.PurchaseOrderHeader entity)
        {
            WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWorksServices();
            proxy.Url = Url;

            try
            {
                WsProxy.PurchaseOrderHeader result = proxy.PurchaseOrderHeaderProvider_Update(Convert(entity));
                Convert(entity, result);
                entity.AcceptChanges();
                return(true);
            }
            catch (SoapException soex)
            {
                System.Diagnostics.Debug.WriteLine(soex);
                throw soex;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(ex);
                throw ex;
            }
        }