public bool AddWoreda(HRDDetail hrdDetail) { var detail = _unitOfWork.HRDDetailRepository.FindBy( m => m.HRDID == hrdDetail.HRDID && m.WoredaID == hrdDetail.WoredaID).FirstOrDefault(); if (detail == null) { _unitOfWork.HRDDetailRepository.Add(hrdDetail); _unitOfWork.Save(); return(true); } return(false); }
private HRDDetail GetDetail(HrdAddWoredaViewModel addWoreda) { var detail = new HRDDetail() { HRDID = addWoreda.HRDID, WoredaID = addWoreda.WoredaID, DurationOfAssistance = addWoreda.Duration, NumberOfBeneficiaries = addWoreda.Beneficiary, StartingMonth = addWoreda.StartingMonth }; return(detail); }
public bool EditHRDDetail(HRDDetail hrdDetail) { _unitOfWork.HRDDetailRepository.Edit(hrdDetail); _unitOfWork.Save(); return(true); }
public bool AddHRDDetail(HRDDetail hrdDetail) { _unitOfWork.HRDDetailRepository.Add(hrdDetail); _unitOfWork.Save(); return(true); }
public DetailViewModel(HRDDetail detail) { _detail = detail; }
public DetailViewModel() { _detail = new HRDDetail(); }