Exemplo n.º 1
0
        public async Task <IActionResult> Edit(Salary s)
        {
            var editSalary = await _sal.Update(s);

            if (editSalary && ModelState.IsValid)
            {
                Alert("Salary Edited successfully.", NotificationType.success);
                return(RedirectToAction("Index"));
            }
            else
            {
                Alert("Salary not Edited!", NotificationType.error);
            }
            return(View());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(Salary salary)
        {
            salary.CreatedBy   = _userManager.GetUserName(User);
            salary.DateCreated = DateTime.Now;
            var editSalary = await _salary.Update(salary);

            if (editSalary && ModelState.IsValid)
            {
                Alert("Salary edited successfully😃.", NotificationType.success);
                return(RedirectToAction("Index"));
            }
            else
            {
                Alert("Salary not edited😔.", NotificationType.error);
            }
            return(View());
        }