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

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FSAppExists(FSApp.AppID))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

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

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

            return(RedirectToPage("Confirmation"));
        }
Beispiel #3
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

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

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

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

            Message = $"Thank you, your application has now been created.  Your manager will review the application form and approve or deny. Once this has been completed all approved applications will be sent to the Executive for approval.";
            return(RedirectToPage("Confirmation"));
        }
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

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

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

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