Exemple #1
0
        // public List<Ocorrencia> DefinirPropriedadesLista(Intelbras.Message.Helper.MSG0315 xml)
        // {
        //     List<Ocorrencia> lstOcorrencia = new List<Ocorrencia>();
        //     return lstOcorrencia;
        // }

        public Pollux.MSG0315 DefinirPropriedades(string numeroSerie)
        {
            Pollux.MSG0315 msg0315 = new Pollux.MSG0315(itb.RetornaSistema(itb.Sistema.CRM), Helper.Truncate(numeroSerie, 40));
            msg0315.NumeroSerieProduto = numeroSerie;
            msg0315.NumeroOperacao     = numeroSerie;

            return(msg0315);
        }
Exemple #2
0
        public string Enviar(Ocorrencia objModel)
        {
            string retMsg  = String.Empty;
            string message = string.Empty;

            if (objModel.ProdutosDoCliente == null)
            {
                throw new ArgumentException("(CRM) Número de série não informado.");
            }

            string numeroSerie = objModel.ProdutosDoCliente;

            Intelbras.Message.Helper.MSG0315 mensagem   = this.DefinirPropriedades(numeroSerie);
            Domain.Servicos.Integracao       integracao = new Servicos.Integracao(this.Organizacao, this.IsOffline);

            try
            {
                message = mensagem.GenerateMessage(true);
            }
            catch (Exception ex)
            {
                throw new ArgumentException("(CRM) (XSD) " + ex.Message, ex);
            }

            if (integracao.EnviarMensagemBarramento(message, "1", "1", out retMsg))
            {
                Intelbras.Message.Helper.MSG0315R1 retorno = CarregarMensagem <Pollux.MSG0315R1>(retMsg);
                if (retorno.Resultado.Sucesso)
                {
                    return(retMsg);
                }
                else
                {
                    throw new ArgumentException("(CRM) " + string.Concat(retorno.Resultado.Mensagem));
                }
            }
            else
            {
                Intelbras.Message.Helper.ERR0001 erro001 = CarregarMensagem <Pollux.ERR0001>(retMsg);
                throw new ArgumentException("(CRM) " + string.Concat(erro001.GenerateMessage(false)));
            }
            return(retMsg);
        }
Exemple #3
0
 public Ocorrencia DefinirPropriedades(Pollux.MSG0315 legado)
 {
     throw new NotImplementedException();
 }