示例#1
0
        public CompanyInfoResponse ToCompanyInfoResponse()
        {
            var hierarchyAddress   = GetHierarchyAddress();
            var ERPHierarchyName   = ADDRESS_OUT.SingleOrDefault(i => i.ADDRNUMBER == hierarchyAddress).NAME1;
            var ERPHierarchyNumber = PARTNERS_OUT.Where(i => i.PARTN_ROLE == SAP_HIERARCHY_NUMBER).First()?.CUSTOMER;

            return(new CompanyInfoResponse {
                ERPHierarchy = new ERPHierarchy(ERPHierarchyNumber, ERPHierarchyName)
            });
        }
示例#2
0
        public PartnerResponse ToPartnerResponse()
        {
            var hierarchyAddress = GetHierarchyAddress();
            var partners         = PARTNERS_OUT.Where(RemoveContactsAndDuplicateBillTos).Select(GetPartnerDetails).ToList();
            var result           = new PartnerResponse
            {
                ERPHierarchyName   = ADDRESS_OUT.SingleOrDefault(i => i.ADDRNUMBER == hierarchyAddress).NAME1,
                ERPHierarchyNumber = PARTNERS_OUT.Where(i => i.PARTN_ROLE == SAP_HIERARCHY_NUMBER).First()?.CUSTOMER,
                Partners           = partners
            };

            return(result);
        }