public string Enviar(ListaPrecoPSDPPPSCF objModel) { string retMsg = String.Empty; Intelbras.Message.Helper.MSG0087 mensagem = this.DefinirPropriedadesPlugin(objModel); Domain.Servicos.Integracao integracao = new Servicos.Integracao(this.Organizacao, this.IsOffline); if (integracao.EnviarMensagemBarramento(mensagem.GenerateMessage(true), "1", "1", out retMsg)) { Intelbras.Message.Helper.MSG0087R1 retorno = CarregarMensagem <Pollux.MSG0087R1>(retMsg); if (!retorno.Resultado.Sucesso) { throw new ArgumentException("(CRM) " + string.Concat(retorno.Resultado.Mensagem)); } } else { Intelbras.Message.Helper.ERR0001 erro001 = CarregarMensagem <Pollux.ERR0001>(retMsg); throw new ArgumentException(string.Concat("(CRM) Erro de Integração \n", erro001.GenerateMessage(false))); } return(retMsg); }
//Nao é usado em nenhum lugar mas nao sei se será usado no futuro , deixei aqui na dúvida //private List<Intelbras.Message.Helper.Entities.ProdutoR1> ConverteLista(List<Product> lstProduto) //{ // List<Intelbras.Message.Helper.Entities.ProdutoR1> lstPollux = new List<Intelbras.Message.Helper.Entities.ProdutoR1>(); // foreach (Product fnCon in lstProduto) // { // Pollux.Entities.ProdutoR1 polluxObj = new Pollux.Entities.ProdutoR1(); // polluxObj.CodigoProduto = fnCon.Codigo; // polluxObj.NomeProduto = fnCon.Nome; // polluxObj.Valor = (decimal)fnCon.CustoAtual; // lstPollux.Add(polluxObj); // } // return lstPollux; //} #endregion #region Definir Propriedades public ListaPrecoPSDPPPSCF DefinirPropriedades(Intelbras.Message.Helper.MSG0087 xml) { throw new NotImplementedException(); }