Esempio n. 1
0
        public async Task <IActionResult> OnGetAsync(string accountCode)
        {
            try
            {
                if (string.IsNullOrEmpty(accountCode))
                {
                    return(NotFound());
                }

                Org_Account = await NodeContext.Org_AccountLookup.FirstOrDefaultAsync(t => t.AccountCode == accountCode);

                if (Org_Account == null)
                {
                    return(NotFound());
                }

                var invoices = from tb in NodeContext.Invoice_Register
                               where tb.AccountCode == accountCode
                               orderby tb.InvoicedOn descending
                               select tb;

                Org_Invoices = await invoices.ToListAsync();

                await SetViewData();

                return(Page());
            }
            catch (Exception e)
            {
                NodeContext.ErrorLog(e);
                throw;
            }
        }
Esempio n. 2
0
        public async Task<IActionResult> OnGetAsync(string accountCode)
        {
            try
            {
                if (string.IsNullOrEmpty(accountCode))
                    return NotFound();

                Org_Account = await NodeContext.Org_AccountLookup.FirstOrDefaultAsync(t => t.AccountCode == accountCode);

                if (Org_Account == null)
                    return NotFound();

                var statement = from tb in NodeContext.Org_Statement
                                where tb.AccountCode == accountCode
                                orderby tb.RowNumber descending
                                select tb;

                Org_Statement = await statement.ToListAsync();

                await SetViewData();
                return Page();
            }
            catch (Exception e)
            {
                NodeContext.ErrorLog(e);
                throw;
            }

        }