private void PartFinderControl1_OnPartAdded(object sender, PartFinderControl.PartAddedArgs e) { bslineItems.Add(new LineItemDto { Description = e.selectPart.ItemDescription, PurchaseOrderID = _purchaseOrder.OrderNum, JobID = _purchaseOrder.JobId.Value, PartID = e.selectPart.PartID, UiD = e.selectPart.UID.GetValueOrDefault(), Price = e.selectPart.Cost.GetValueOrDefault(), Quantity = 0.0m }); }
private void PartFinderControl_OnPartAdded1(object sender, PartFinderControl.PartAddedArgs e) { if (e.selectPart != null) { LineItemDto newLineItem = new LineItemDto { PurchaseOrderID = orderDTO.PurchaseOrderID, Description = e.selectPart.ItemDescription, JobID = orderDTO.JobID, Quantity = 1.0m, PartID = e.selectPart.PartID, Price = e.selectPart.Cost.GetValueOrDefault(), UiD = e.selectPart.UID.GetValueOrDefault() }; bsLineitems.Add(newLineItem); } }