private void ProcessDetail(IList <string> entStrList, PurchaseOrder poEnt) { if (entStrList != null && entStrList.Count > 0) { for (int j = 0; j < entStrList.Count; j++) { Newtonsoft.Json.Linq.JObject objL = JsonHelper.GetObject <Newtonsoft.Json.Linq.JObject>(entStrList[j]); PurchaseOrderDetail podEnt = new PurchaseOrderDetail(); podEnt.PurchaseOrderId = poEnt.Id; podEnt.ProductId = objL.Value <string>("ProductId"); podEnt.Name = objL.Value <string>("Name"); podEnt.Code = objL.Value <string>("Code"); podEnt.PCN = objL.Value <string>("PCN"); podEnt.BuyPrice = objL.Value <decimal>("BuyPrice"); podEnt.Quantity = objL.Value <int>("Quantity"); podEnt.Amount = objL.Value <decimal>("Amount"); podEnt.PayState = "未付款"; podEnt.InWarehouseState = "未入库"; podEnt.InvoiceState = "未关联"; if (!string.IsNullOrEmpty(objL.Value <string>("ExpectedArrivalDate"))) { podEnt.ExpectedArrivalDate = objL.Value <DateTime>("ExpectedArrivalDate"); } podEnt.DoCreate(); } } }