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