Esempio n. 1
0
        /// <summary>
        /// Get CorporateRollupAccountsList
        /// </summary>
        /// <returns></returns>
        public async Task <List <AccountCacheItem> > GetRollupAccountsList(AutoSearchInput input)
        {
            var accountList = await _accountcache.GetAccountCacheItemAsync(
                CacheKeyStores.CalculateCacheKey(CacheKeyStores.AccountKey, Convert.ToInt32(_customAppSession.TenantId)));

            return(accountList.ToList().WhereIf(!string.IsNullOrEmpty(input.Query),
                                                p => p.Caption.EmptyIfNull().ToUpper().Contains(input.Query.ToUpper()) || p.AccountNumber.EmptyIfNull().ToUpper().Contains(input.Query.ToUpper()) ||
                                                p.Description.EmptyIfNull().ToUpper().Contains(input.Query.ToUpper())).Where(p => p.IsCorporate && p.IsRollupAccount).ToList());
        }