private Order Map(OrderHeaderData order_data) { return(ExecuteFaultHandledOperation(() => { Log.Debug($"MapOrderHeaderDataToOrder AccountContactKey: {order_data.AccountContactKey}"); var order = _order_se.Map(order_data); order.OrderStatusData = _order_status_be.GetStatusByID(order_data.OrderStatusKey); order.AccountRep = _employee_be.GetAccountRepByKey(order_data.AccountRepKey); order.SalesRep = _employee_be.GetSalesRepByKey(order_data.SalesRepKey); order.OrderAccountContact = //new PersonBase() _employee_be.GetEmployeeByID(order_data.AccountContactKey) == null ? new PersonBase() : _employee_be.GetEmployeeByID(order_data.AccountContactKey); return order; })); }
private Invoice Map(InvoiceData invoice_data) { var invoice = _invoice_se.Map(invoice_data); invoice.AccountRep = _employee_be.GetAccountRepByKey(invoice_data.AccountRepKey); invoice.SalesRep = _employee_be.GetSalesRepByKey(invoice_data.SalesRepKey); invoice.InvoiceAccountContact = _employee_be.GetEmployeeByID(invoice_data.AccountContactKey); return(invoice); }
public Employee GetEmployee(int entity_person_key) { IEmployeeBusinessEngine employee_be = _business_engine_factory.GetBusinessEngine <IEmployeeBusinessEngine>(); return(employee_be.GetEmployeeByID(entity_person_key)); }