예제 #1
0
        public IActionResult Delete(int id)
        {
            if (id > 0)
            {
                _employeesService.Delete(id);
            }

            return(RedirectToAction(nameof(Employees)));
            //return View(Employees());
        }
        public IActionResult Remove(EmployeeViewModel model)
        {
            if (model.Id == 0)
            {
                return(NotFound());
            }

            _employeesService.Delete(model.Id);

            return(RedirectToAction(nameof(Index)));
        }
        public async Task <IActionResult> Delete(int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(new ModelStateResult(ModelState)));
            }

            var deleteEmployeeResultDto = await _employeesService.Delete(id, UserId);

            return(Ok(deleteEmployeeResultDto));
        }
예제 #4
0
        public IActionResult Delete(int?id)
        {
            var model = _employeesService.GetById(id.Value);

            if (model == null)
            {
                return(NotFound());
            }

            _employeesService.Delete(id.Value);
            _bookService.DeleteAllByOwnerId(id.Value);
            return(RedirectToAction("Index"));
        }
예제 #5
0
 public IActionResult Delete(int Id)
 {
     _employeesService.Delete(Id);
     return(RedirectToAction(nameof(Employee)));
 }
예제 #6
0
 public IActionResult Delete(EmployeerViewModel emp)
 {
     _EmployeesData.Delete(emp.ID);
     return(RedirectToAction("Index"));
 }
예제 #7
0
 public void Delete(string id)
 {
     employeesServiceDelegate.Delete(id);
 }
예제 #8
0
 public IActionResult Delete(int id)
 {
     _employeesService.Delete(id);
     return(RedirectToAction(nameof(Index)));
 }
 public IActionResult Delete(Employee emp)
 {
     empService.Delete(emp);
     return(NoContent());
 }
예제 #10
0
 public void Delete(int id) => _employeesService.Delete(id);
 public IActionResult Delete(int id)
 {
     _employees.Delete(id);
     return(RedirectToAction("Employees"));
 }
예제 #12
0
        public async Task <IActionResult> Delete([FromRoute] string id)
        {
            await employeesService.Delete(id);

            return(StatusCode((int)StatusCodes.Status204NoContent));
        }
 public bool Delete(int id)
 {
     return(_employeesService.Delete(id));
 }
예제 #14
0
        public async Task <IActionResult> Delete(int id)
        {
            await _employeesService.Delete(id);

            return(NoContent());
        }