Пример #1
0
        public NotificationResult Salvar(Equipamentos_Inventario entidade)
        {
            var notificationResult = new NotificationResult();

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

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

                    notificationResult.Add("Equipamentos Inventario cadastrado com sucesso.");
                }

                notificationResult.Result = entidade;

                return(notificationResult);
            }
            catch (Exception ex)
            {
                return(notificationResult.Add(new NotificationError(ex.Message)));
            }
        }
Пример #2
0
 public string Excluir(Equipamentos_Inventario entidade)
 {
     return("");
 }
 public string Excluir(Equipamentos_Inventario entidade)
 {
     return(equipamento_Inventario_Servico.Excluir(entidade));
 }
 public NotificationResult Salvar(Equipamentos_Inventario entidade)
 {
     return(equipamento_Inventario_Servico.Salvar(entidade));
 }