public async Task OnGetAsync()
 {
     Companies     = (await _companyAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
     {
         MaxResultCount = 1000
     })).Items.ToList();
     HeadAccounts  = (await _headAccountsAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
     {
         MaxResultCount = 1000
     })).Items.ToList();
     SubCategories = (await _subCategoryAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
     {
         MaxResultCount = 1000
     })).Items.ToList();
 }
Exemple #2
0
        public async Task <IActionResult> OnGetAsync()
        {
            Companies             = (await _companyAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 100
            })).Items.ToList();
            Branches              = (await _branchAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 100
            })).Items.ToList();
            HeadAccounts          = (await _headAccountsAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 100
            })).Items.ToList();
            SubCategories         = (await _subCategoryAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 100
            })).Items.ToList();
            SubLedgerAccounts     = _coaAppService.GetNonSubLedgerAccounts();
            SubLedgerRequirements = (await _subLedgerRequirementsAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 100
            })).Items.ToList();

            COAInput = ObjectMapper.Map <COA_Account_Dto, COA_Account_UV_Dto>(await _coaAppService.GetAsync(AccountGuid));

            return(Page());
        }
        public async Task OnGetAsync()
        {
            Companies     = (await _companyAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 1000
            })).Items.ToList();
            HeadAccounts  = (await _headAccountsAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 1000
            })).Items.ToList();
            SubCategories = (await _subCategoryAppService.GetListAsync(new Volo.Abp.Application.Dtos.PagedAndSortedResultRequestDto()
            {
                MaxResultCount = 1000
            })).Items.ToList();

            List <COA_AccountSubCategory_Dto> subCats = _subCategoryAppService.GetDetailedList();

            foreach (COA_AccountSubCategory_Dto subCategory_Dto in subCats)
            {
                if (subCategory_Dto.ParentId.HasValue)
                {
                    Guid pId = subCategory_Dto.ParentId.Value;
                    subCategory_Dto.ParentCategory = await _subCategoryAppService.GetAsync(pId);

                    subCategory_Dto.ParentCategoryTitle = subCategory_Dto.ParentCategory.Title;
                }
                else
                {
                    subCategory_Dto.ParentCategoryTitle = "—";
                }
            }

            ViewData["Categories_DS"] = subCats;
        }