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); }
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>()); }
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); }