Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public bool EditHRDDetail(HRDDetail hrdDetail)
 {
     _unitOfWork.HRDDetailRepository.Edit(hrdDetail);
     _unitOfWork.Save();
     return(true);
 }
Beispiel #4
0
 public bool AddHRDDetail(HRDDetail hrdDetail)
 {
     _unitOfWork.HRDDetailRepository.Add(hrdDetail);
     _unitOfWork.Save();
     return(true);
 }
Beispiel #5
0
 public DetailViewModel(HRDDetail detail)
 {
     _detail = detail;
 }
Beispiel #6
0
 public DetailViewModel()
 {
     _detail = new HRDDetail();
 }
Beispiel #7
0
 public DetailViewModel(HRDDetail detail)
 {
     _detail = detail;
 }
Beispiel #8
0
 public DetailViewModel()
 {
     _detail = new HRDDetail();
 }