Beispiel #1
0
        public NotificationResult Salvar(Bonus_Proficiencia entidade)
        {
            var notificationResult = new NotificationResult();

            try
            {
                if (entidade.CodBonusProficiencia == 0)
                {
                    notificationResult.Add(new NotificationError("CodBonusProficiencia não pode ser zero.", NotificationErrorType.USER));
                }

                if (notificationResult.IsValid)
                {
                    _bonus_Proficiencia_Repositorio.Adicionar(entidade);

                    notificationResult.Add("Bonus Proficiencia cadastrado com sucesso.");
                }

                notificationResult.Result = entidade;

                return(notificationResult);
            }
            catch (Exception ex)
            {
                return(notificationResult.Add(new NotificationError(ex.Message)));
            }
        }
Beispiel #2
0
 public string Excluir(Bonus_Proficiencia entidade)
 {
     return(bonus_Proficiencia_Servico.Excluir(entidade));
 }
Beispiel #3
0
 public NotificationResult Salvar(Bonus_Proficiencia entidade)
 {
     return(bonus_Proficiencia_Servico.Salvar(entidade));
 }
Beispiel #4
0
 public string Excluir(Bonus_Proficiencia entidade)
 {
     return("");
 }