コード例 #1
0
        public NotificationResult Salvar(Qtd_Magia_Ciclo entidade)
        {
            var notificationResult = new NotificationResult();

            try
            {
                if (entidade.CodClasse == 0 || entidade.CodNivel == 0)
                {
                    notificationResult.Add(new NotificationError("Qtde. de produtos no Estoque inválido.", NotificationErrorType.USER));
                }

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

                    notificationResult.Add("Produto cadastrado com sucesso.");
                }

                notificationResult.Result = entidade;

                return(notificationResult);
            }
            catch (Exception ex)
            {
                return(notificationResult.Add(new NotificationError(ex.Message)));
            }
        }
コード例 #2
0
 public string Excluir(Qtd_Magia_Ciclo entidade)
 {
     return(qtd_Magias_Ciclo_Servico.Excluir(entidade));
 }
コード例 #3
0
 public NotificationResult Salvar(Qtd_Magia_Ciclo entidade)
 {
     return(qtd_Magias_Ciclo_Servico.Salvar(entidade));
 }
コード例 #4
0
 public string Excluir(Qtd_Magia_Ciclo entidade)
 {
     return("");
 }