Beispiel #1
0
 public async Task OnGetAsync()
 {
     if (User.Identity.IsAuthenticated)
     {
         officeMembers       = _context.TblOfficeMembers.Where(m => m.SystemCode == Services.UserMemberId).ToList();
         tblFinancialBalance = await _context.TblFinancialBalances.Where(m => m.SystemCode == Services.UserMemberId).SingleOrDefaultAsync();
     }
 }
Beispiel #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TblFinancialBalance = await _context.TblFinancialBalances.FirstOrDefaultAsync(m => m.BusinessId == id);

            if (TblFinancialBalance == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Beispiel #3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TblFinancialBalance = await _context.TblFinancialBalances.FindAsync(id);

            if (TblFinancialBalance != null)
            {
                _context.TblFinancialBalances.Remove(TblFinancialBalance);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }