/// <summary> /// 删除医护人员 /// </summary> /// <param name="dialysisDoctorId">透析医护人员Id(华墨系统Id)</param> /// <param name="hospitalId">医院Id</param> /// <returns>是否保存成功</returns> public async Task <OutputBase> DeleteDoctor(long hospitalId, string dialysisDoctorId) { var doctor = await _repository.Get(dialysisDoctorId, hospitalId); if (doctor == null) { return(OutputBase.Fail("该医生不存在")); } _repository.Delete(doctor); return(_unitWork.Commit() ? OutputBase.Success("删除成功") : OutputBase.Fail("该医生不存在")); }
public ActionResult DeleteConfirmed(int id) { DoctorRepository doctorRepo = new DoctorRepository(); doctorRepo.Delete(id); doctorRepo.Save(); return(RedirectToAction("Index")); }
public IActionResult Delete(string TypeName) { Doctor doctor = _doctorRepository.Get(TypeName); if (doctor == null) { return(NotFound("The doctor record couldn't be found.")); } _doctorRepository.Delete(doctor); return(NoContent()); }
public IActionResult DeleteDoctor(string adminName, int doctorId) { if (loggedInAdmins.checkIfLoggedIn(adminName)) { var doctor = doctorRepository.GetByID(doctorId); doctorRepository.Delete(doctor); return(Ok()); } else { return(Ok()); } }
public void Remove(int index) { var doctor = view.bindingList.ElementAt(index); using (var visitRepository = new VisitRepository()) { foreach (var visitVM in visitRepository.GetAllVisits()) { if (visitVM.OrvosId == doctor.Id) { throw new Exception("Az adott orvosnak volt rendelése, nem törölhetők az adatai."); } } } repository.Delete(doctor.Id); view.bindingList.RemoveAt(index); }
public Doctor Delete(int id) { return(_repository.Delete(id)); }
public void Delete(Doctor entity) => _doctorRepository.Delete(entity);
public ActionResult Delete(int id) { repo.Delete(id); return(RedirectToAction("Index")); }
public async Task <Doctor> Delete(Guid id) { var entity = await _repository.Delete(id); return(entity); }
public void Delete(Doctor doctor) => _repository.Delete(doctor);
public override void Remove(DoctorUser doctor) { doctorRepository.Delete(doctor.id); removeDoctorFromSchedule(doctor); }
public IHttpActionResult Delete(int id) { doctorRepository.Delete(id); return(StatusCode(HttpStatusCode.NotFound)); }
public bool Delete(Doctor doctor) { return(doctorRepository.Delete(doctor)); }
public static void DeleteDoctorData(string userId) { DoctorRepository.Delete(userId); }