public IActionResult OnGetRemove(Guid id)
        {
            if (_gradebook.RemoveGrade(id))
            {
                MessageSuccess += "Record removed successfully (" + id + ")";
            }

            return(RedirectToPage("./Index"));
        }
Example #2
0
        public IActionResult OnGetRemove(Guid id)
        {
            if (_gradebook.RemoveGrade(id))
            {
                MessageSuccess += $"Record removed successfully ({id})";
            }
            else
            {
                MessageError += $"Record id={id} not found!";
            }

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