-2

不断收到类似“从 XML 读取日期类型的值时出错”这样的异常消息。使用 aif 插入 salesorder 时。

   //string deliverdt = "19/05/2017";

DateTime date = DateTime.ParseExact(deliverdt, "dd/MM/yyyy", null);

AxdEntity_SalesTable salesTable = new AxdEntity_SalesTable();
salesTable.CurrencyCode = "USD";
salesTable.CustAccount = "C-000003";
salesTable.DeliveryDate = new DateTime(2017, 5, 19); // Convert.ToDateTime("19/05/2017"); //System.DateTime.Now; 
// salesTable.DeliveryDate = Convert.ToDateTime(dt);
//Convert.ToDateTime("5/19/2017");
salesTable.Payment = "N07";
salesTable.PurchOrderFormNum = "PO";

AxdEntity_SalesLine salesLine = new AxdEntity_SalesLine();
salesLine.ItemId = "A3300-HV";
salesLine.SalesQty = 1;
salesLine.SalesUnit = "ea";
salesLine.SalesPrice = 2000;

4

2 回答 2

0

你试过salesTable.DeliveryDateSpecified = true;吗?

.NET 包装器为值类型创建指定属性。

于 2017-05-20T10:59:15.767 回答
0

就我而言,这足以满足领域salesTable.ReceiptDateRequested

于 2020-01-15T14:18:55.963 回答