public void UpdateRFAIMRReferenceNumberByReferralID() { DLModel.RFAReferral _rFAReferral = new DLModel.RFAReferral { RFAIMRReferenceNumber = "IMR123GHK", RFAReferralID = 236 }; var _id = _iMRRepository.UpdateRFAIMRReferenceNumberByReferralID(_rFAReferral); Assert.IsTrue(_id > 0, "failed"); }
public int UpdateRFAIMRReferenceNumberByReferralID(DLModel.RFAReferral _rFAReferral) { if (_rFAReferralRepo.GetAll(rk => rk.RFAReferralID != _rFAReferral.RFAReferralID && rk.RFAIMRReferenceNumber == _rFAReferral.RFAIMRReferenceNumber).Count() > 0) { return(0); } else { _rFAReferralRepo.Update(_rFAReferral, (rFAReferral => rFAReferral.RFAIMRReferenceNumber), (rFAReferral => rFAReferral.RFAReferralID)); return(2); } }
public int UpdateRFAIMRHistoryRationaleByReferralID(DLModel.RFAReferral _rFAReferral) { _rFAReferralRepo.Update(_rFAReferral, (rFAReferral => rFAReferral.RFAIMRHistoryRationale), (rFAReferral => rFAReferral.RFAReferralID)); return(2); }