Beispiel #1
0
        public bool Update(Recruitment recruitment)
        {
            bool Error = false;

            if (string.IsNullOrEmpty(recruitment.Description))
            {
                Validator.AddError("Description", "A descrição é obrigatória");
                Error = true;
            }

            //Validar a data [VALIDAR]

            if (Error)
            {
                return(false);
            }

            RecruitmentRepository.Update(recruitment);

            return(true);
        }
 public RecruitmentBusinessLogic()
 {
     _repo = new RecruitmentRepository();
 }
Beispiel #3
0
        public IEnumerable <Recruitment> GetAll()
        {
            var recruitment = RecruitmentRepository.GetAll();

            return(recruitment);
        }
Beispiel #4
0
        public Recruitment Get(int id)
        {
            var recruitment = RecruitmentRepository.Get(id);

            return(recruitment);
        }
Beispiel #5
0
 public bool Delete(int id)
 {
     RecruitmentRepository.Delete(id);
     return(true);
 }