Esempio n. 1
0
        public async Task <IEnumerable <BankAccount> > SearchInfo()
        {
            List <BankAccount> list = null;
            await ServiceProxyFactory.LifeTime(async factory =>
            {
                var service = factory.Create <BankAccountMasterClient>();
                BankAccountsResult result = await service.GetItemsAsync(
                    Application.Login.SessionKey, Application.Login.CompanyId, new BankAccountSearch());

                if (result.ProcessResult.Result)
                {
                    list = result.BankAccounts;
                }
            });

            return(list);
        }
Esempio n. 2
0
        private async Task <List <BankAccount> > LoadListAsync()
        {
            List <BankAccount> list = null;
            await ServiceProxyFactory.LifeTime(async factory =>
            {
                var service = factory.Create <BankAccountMasterClient>();
                BankAccountsResult result = await service.GetItemsAsync(
                    Login.SessionKey,
                    Login.CompanyId,
                    new BankAccountSearch());

                if (result.ProcessResult.Result)
                {
                    list = result.BankAccounts;
                }
            });

            return(list ?? new List <BankAccount>());
        }
Esempio n. 3
0
        public async Task <IEnumerable <BankAccount> > SearchByKey(params string[] keys)
        {
            List <BankAccount> list = null;
            await ServiceProxyFactory.LifeTime(async factory =>
            {
                var service = factory.Create <BankAccountMasterClient>();
                BankAccountsResult result = await service.GetItemsAsync(
                    Application.Login.SessionKey, Application.Login.CompanyId, new BankAccountSearch()
                {
                    UseCommonSearch = true,
                    BankName        = keys[0],
                });

                if (result.ProcessResult.Result)
                {
                    list = result.BankAccounts;
                }
            });

            return(list);
        }