Exemple #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(CurrencyTypes).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CurrencyTypesExists(CurrencyTypes.Id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.StatusTypes.Add(StatusTypes);
            await _context.SaveChangesAsync();

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            TransactionLogs = await _context.TransactionLogs.FindAsync(id);

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

            return(RedirectToPage("./Index"));
        }
Exemple #4
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            CurrencyTypes = await _context.CurrencyTypes.FindAsync(id);

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

            return(RedirectToPage("./Index"));
        }
Exemple #5
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            PettyCashRequests = await _context.PettyCashRequests.FindAsync(id);

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

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