Esempio n. 1
0
        public importacaolctctbImportar3Out EnviarLancamentoContabil(importacaolctctbImportar3In item)
        {
            if (!string.IsNullOrEmpty(this.UrlWsLancamentoContabil))
            {
                this.WsLancamentoContabil.Url = this.UrlWsLancamentoContabil;
            }

            if (this.TimeoutWS > 0)
            {
                this.WsLancamentoContabil.Timeout = this.TimeoutWS;
            }

            if (this.Assincrono)
            {
                this.WsLancamentoContabil.Importar_3Async(
                    this.UsuarioWS,
                    this.SenhaWS,
                    this.EncryptionWS,
                    item);

                return(null);
            }
            else
            {
                var retorno = this.WsLancamentoContabil.Importar_3(
                    this.UsuarioWS,
                    this.SenhaWS,
                    this.EncryptionWS,
                    item);

                return(retorno);
            }
        }
Esempio n. 2
0
        private importacaolctctbImportar3In ConverterLancamentosContabeis(IEnumerable <LancamentoContabil> lancamentos)
        {
            var retorno = new importacaolctctbImportar3In();

            if (lancamentos != null && lancamentos.Any())
            {
                var items = lancamentos.ToList();

                retorno.gridLct = new importacaolctctbImportar3InGridLct[items.Count];

                for (var i = 0; i < items.Count; i++)
                {
                    retorno.gridLct[i] = new importacaolctctbImportar3InGridLct()
                    {
                        codEmp          = items[i].CODEMP,
                        codFil          = items[i].CODFIL,
                        cplLct          = items[i].CPLLCT,
                        ctaCre          = items[i].CTACRE,
                        ctaDeb          = items[i].CTADEB,
                        datLct          = items[i].DATLCT,
                        docLct          = items[i].DOCLCT,
                        numLot          = items[i].NUMLOT,
                        vlrLct          = items[i].VLRLCT,
                        obsCpl          = items[i].OBSCPL,
                        oriLct          = "MAN",
                        codEmpSpecified = true,
                        codFilSpecified = true,
                        ctaCreSpecified = true,
                        ctaDebSpecified = true,
                        numLotSpecified = true,
                        vlrLctSpecified = true
                    };
                }
            }

            return(retorno);
        }