public int UpdatePatientAdverseEventOutcome(PatientAdverseEventOutcome patientAdverseEventOutcome) { var outcome = new PatientAdverseEventOutcome() { //Id=patientAdverseEventOutcome.Id, OutcomeId = patientAdverseEventOutcome.OutcomeId, }; using (UnitOfWork unitOfWork = new UnitOfWork(new GreencardContext())) { unitOfWork.PatientAdverseEventOutcomeRepository.Update(outcome); result = unitOfWork.Complete(); unitOfWork.Dispose(); return(result); } }
public string UpdatePatientAdverseEventOutcome(PatientAdverseEventOutcome patientAdverseEventOutcome) { try { result = _patientAdverseEventOutcomeManager.UpdatePatientAdverseEventOutcome(patientAdverseEventOutcome); if (result > 0) { jsonMessage = "Adverse Event Outcome updated!"; } } catch (Exception e) { jsonMessage = e.Message.ToString(); } return(jsonMessage); }
public string SavePatientAdverseEventOutcome(PatientAdverseEventOutcome patientAdverseEventOutcome) { try { result = _patientAdverseEventOutcomeManager.SavePatientAdverseEventOutcome(patientAdverseEventOutcome); if (result > 0) { jsonMessage = "Adverse Event Outcome Saved!"; } } catch (Exception e) { jsonMessage = e.Message.ToString(); //you can also log the problem here } return(jsonMessage); }
public int SavePatientAdverseEventOutcome(PatientAdverseEventOutcome patientAdverseEventOutcome) { var outcome = new PatientAdverseEventOutcome() { PatientId = patientAdverseEventOutcome.PatientId, PatientMasterVisitid = patientAdverseEventOutcome.PatientMasterVisitid, AdverseEventId = patientAdverseEventOutcome.AdverseEventId, OutcomeId = patientAdverseEventOutcome.OutcomeId, OutcomeDate = patientAdverseEventOutcome.OutcomeDate, UserId = patientAdverseEventOutcome.UserId }; using (UnitOfWork unitOfWork = new UnitOfWork(new GreencardContext())) { unitOfWork.PatientAdverseEventOutcomeRepository.Add(outcome); result = unitOfWork.Complete(); unitOfWork.Dispose(); return(result); } }