Beispiel #1
0
        private async Task <List <CustomerGroup> > GetPrintDataAsync()
        {
            List <CustomerGroup> list = null;
            await ServiceProxyFactory.LifeTime(async factory =>
            {
                var customerGroup           = factory.Create <CustomerGroupMasterClient>();
                CustomerGroupsResult result = await customerGroup.GetPrintCustomerDataAsync(SessionKey, CompanyId);
                if (result.ProcessResult.Result)
                {
                    list = result.CustomerGroups;
                }
            });

            return(list ?? new List <CustomerGroup>());
        }
Beispiel #2
0
        private async Task <List <CustomerGroup> > GetChildCustomersByParentId(int parentCustomerId)
        {
            List <CustomerGroup> list = null;

            if (parentCustomerId != 0)
            {
                await ServiceProxyFactory.LifeTime(async factory =>
                {
                    var service = factory.Create <CustomerGroupMasterClient>();
                    CustomerGroupsResult result = await service.GetByParentAsync(
                        SessionKey, parentCustomerId);
                    if (result.ProcessResult.Result)
                    {
                        list = result.CustomerGroups;
                    }
                });
            }
            return(list ?? new List <CustomerGroup>());
        }