Exemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            var deleteSalary = await _salary.Delete(id);

            if (deleteSalary)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Delete(int id)
        {
            var deleteSalary = await _sal.Delete(id);

            if (deleteSalary)
            {
                Alert("Salary Details Deleted successfully.", NotificationType.success);
                return(RedirectToAction("Index"));
            }
            else
            {
                Alert("Salary Details not Deleted!", NotificationType.error);
            }
            return(View());
        }