예제 #1
0
 internal static void ParseInvoice(XElement invoice, Invoice ret)
 {
     ret.InvoiceID = invoice.Element("InvoiceID").Value;
     ret.CustomerName = invoice.Element("CustomerName").Value;
     ret.Status = Utils.ParseInt(invoice.Element("Status").Value);
     ret.InvoiceNumber = invoice.Element("InvoiceNumber").Value;
     ret.PONumber = invoice.Element("PONumber").Value;
     ret.InvoiceDate = Utils.ParseDate(invoice.Element("InvoiceDate").Value);
     ret.DueDate = Utils.ParseDate(invoice.Element("DueDate").Value);
     if (invoice.Element("DueByDays") != null)
     {
         ret.DueByDays = Utils.ParseInt(invoice.Element("DueByDays").Value);
     }
     ret.CurrencyCode = invoice.Element("CurrencyCode").Value;
     ret.Total = Utils.ParseDecimal(invoice.Element("Total").Value);
     ret.Balance = Utils.ParseDecimal(invoice.Element("Balance").Value);
     if (invoice.Element("CreatedTimeInMillis") != null)
     {
         ret.CreatedTimeInMillis = Utils.ParseLong(invoice.Element("CreatedTimeInMillis").Value);
     }
 }
예제 #2
0
        internal static Invoice ParseInvoice(XElement invoice)
        {
            Invoice ret = new Invoice();

            ParseInvoice(invoice, ret);

            return ret;
        }