private void OnDeleteItemCommandExecuted(Paciente item) { if (_pacienteService.Delete(item) > 0) { Pacientes.Remove(item); } }
public ActionResult DeleteUser(int id) { if (pacienteService.Delete(id)) { return(NoContent()); } else { return(NotFound()); } }
public IHttpActionResult ExcluiPaciente(string cpf) { var retorno = _pacienteService.Delete(cpf); if (!retorno.Status) { return(new InvalidListMessageResult(retorno.Message)); } return(Ok(retorno)); }
public ActionResult <Paciente> Delete(int id) { var paciente = _service.Find(id); if (paciente == null) { return(NotFound()); } _service.Delete(paciente); return(NoContent()); //return Ok(paciente); }
public IHttpActionResult DeletePaciente(long id) { Paciente paciente; try { paciente = pacienteService.Delete(id); } catch (NoEncontradoException) { return(NotFound()); } return(Ok(paciente)); }
public async Task <ActionResult> Delete(Guid id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { return(Ok(await _service.Delete(id))); } catch (ArgumentException e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }
public IActionResult Delete(int id) { try { _pacienteService.Delete(_pacienteService.Get(id)); return(Ok()); } catch (AppException ex) { return(SendFeedback(ex.Message)); } catch (System.Exception ex) { _logger.LogError(ex.Message, ex, ex.InnerException); return(SendFeedback(_unavailable)); } }
public IActionResult Delete(int id) { if (!Exists(id)) { return(NotFound()); } _pacienteRepository.BeginTransaction(); // excluindo var paciente = _pacienteService.Delete(id); if (_notification.Any) { _pacienteRepository.RollbackTransaction(); return(BadRequest()); } _pacienteRepository.CommitTransaction(); return(Ok(paciente)); }
public async Task <IActionResult> Delete(int id) { _pacienteService.Delete(id); return(Ok("paciente foi deleteado")); }
public IActionResult Delete(int id) { return(Json( _PacienteService.Delete(id) )); }
public ActionResult Delete(int id) { return(Ok( pacienteService.Delete(id) )); }
public void Delete(int id) { _pacienteService.Delete(id); }
public IActionResult Delete(int id) { _pacienteService.Delete(id); return(NoContent()); }
public void Delete(Guid Id) { service.Delete(Id); }
public IActionResult DeleteConfirmed(int id) { _pacienteService.Delete(id); _pacienteService.SaveChanges(); return(RedirectToAction(nameof(Index))); }
public bool Delete(int ID) { return(PacienteService.Delete(ID)); }
public void Delete(Guid Idpaciente) { service.Delete(Idpaciente); }