public ContactViewModel GetPurchaserCustomer(OrderGroup order) { if (order == null) { return(null); } if (!order.IsQuoteCart()) { return(new ContactViewModel(_customerDomainService.GetContactById(order.CustomerId.ToString()))); } var parentOrder = _orderRepository.Load <PurchaseOrder>(order.GetParentOrderId()); return(parentOrder != null ? new ContactViewModel(_customerDomainService.GetContactById(parentOrder.CustomerId.ToString())) : null); }
public ContactViewModel GetContactById(string id) { return(new ContactViewModel(_customerDomainService.GetContactById(id))); }