Beispiel #1
0
 public Invoice(InvoiceDS.ClientInvoiceTableRow invoice)
 {
     //Constructor
     try {
         if (invoice != null)
         {
             if (!invoice.IsInvoiceNumberNull())
             {
                 this.mInvoiceNumber = invoice.InvoiceNumber;
             }
             if (!invoice.IsInvoiceDateNull())
             {
                 this.mInvoiceDate = invoice.InvoiceDate;
             }
             if (!invoice.IsPostToARDateNull())
             {
                 this.mPostToARDate = invoice.PostToARDate;
             }
             if (!invoice.IsCartonsNull())
             {
                 this.mCartons = invoice.Cartons;
             }
             if (!invoice.IsPalletsNull())
             {
                 this.mPallets = invoice.Pallets;
             }
             if (!invoice.IsWeightNull())
             {
                 this.mWeight = invoice.Weight;
             }
             if (!invoice.IsAmountNull())
             {
                 this.mAmount = invoice.Amount;
             }
             if (!invoice.IsDescriptionNull())
             {
                 this.mDescription = invoice.Description;
             }
             if (!invoice.IsReleaseDateNull())
             {
                 this.mReleaseDate = invoice.ReleaseDate;
             }
             if (!invoice.IsInvoiceTypeCodeNull())
             {
                 this.mInvoiceTypeCode = invoice.InvoiceTypeCode;
             }
             if (!invoice.IsInvoiceTypeDescriptionNull())
             {
                 this.mInvoiceTypeDescription = invoice.InvoiceTypeDescription;
             }
             if (!invoice.IsInvoiceTypeTargetNull())
             {
                 this.mInvoiceTypeTarget = invoice.InvoiceTypeTarget;
             }
             if (!invoice.IsBillToNull())
             {
                 this.mBillTo = invoice.BillTo;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating new Client instance", ex); }
 }