Ejemplo n.º 1
0
        public LeaveRuleDTO InsertLeaveRule(LeaveRuleDTO leaveRule)
        {
            LeaveRule lr = LeaveRuleRequestFormatter.ConvertRespondentInfoFromDTO(leaveRule);

            return(LeaveRuleRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.LeaveRuleRepository.Create(lr)));
        }
Ejemplo n.º 2
0
        public int UpdateLeaveRule(LeaveRuleDTO editLeaveRule)
        {
            LeaveRule editLR = LeaveRuleRequestFormatter.ConvertRespondentInfoFromDTO(editLeaveRule);

            return(_unitOfWork.LeaveRuleRepository.Update(editLR));
        }
Ejemplo n.º 3
0
        public LeaveRuleDTO GetLeaveRuleById(int id)
        {
            LeaveRule lr = _unitOfWork.LeaveRuleRepository.Get(x => x.LeaveRuleId == id).FirstOrDefault();

            return(LeaveRuleRequestFormatter.ConvertRespondentInfoToDTO(lr));
        }