Example #1
0
        public bool ValidarRepresentante(Int32 codigoRepresentante, String tipoObjetoCliente, ref String resposta)
        {
            Pollux.MSG0161 msg0161 = new Pollux.MSG0161(Domain.Enum.Sistemas.RetornaSistema(Domain.Enum.Sistemas.Sistema.CRM), tipoObjetoCliente);
            msg0161.CodigoRepresentante = codigoRepresentante;

            Domain.Servicos.Integracao integracao = new Servicos.Integracao(this.Organizacao, this.IsOffline);
            if (integracao.EnviarMensagemBarramento(msg0161.GenerateMessage(true), "1", "1", out resposta))
            {
                Intelbras.Message.Helper.MSG0161R1 retorno = CarregarMensagem <Pollux.MSG0161R1>(resposta);
                if (retorno.RepresentanteValido.Equals(1))
                {
                    resposta = retorno.Resultado.Mensagem;
                    return(true);
                }
                else
                {
                    resposta = retorno.Resultado.Mensagem;
                    return(false);
                }
            }
            else
            {
                Intelbras.Message.Helper.ERR0001 erro001 = CarregarMensagem <Pollux.ERR0001>(resposta);
                throw new Exception(erro001.GenerateMessage(false));
            }
        }
Example #2
0
        public Usuario DefinirPropriedades(Intelbras.Message.Helper.MSG0161 xml)
        {
            var crm = new Model.Usuario(this.Organizacao, this.IsOffline);

            return(crm);
        }