示例#1
0
        public NotificationResult Salvar(Arma_Inventario entidade)
        {
            var notificationResult = new NotificationResult();

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

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

                    notificationResult.Add("Arma Classe cadastrado com sucesso.");
                }

                notificationResult.Result = entidade;

                return(notificationResult);
            }
            catch (Exception ex)
            {
                return(notificationResult.Add(new NotificationError(ex.Message)));
            }
        }
示例#2
0
 public string Excluir(Arma_Inventario entidade)
 {
     return(arma_Inventario_Servico.Excluir(entidade));
 }
示例#3
0
 public NotificationResult Salvar(Arma_Inventario entidade)
 {
     return(arma_Inventario_Servico.Salvar(entidade));
 }
示例#4
0
 public string Excluir(Arma_Inventario entidade)
 {
     return("");
 }