Exemplo n.º 1
0
        public void InserirDoc(ListaBoletos entity, string chave, string senha, string tipo)
        {
            var result = entity.NumeroDocumento != null?DataHelperProdespReserva.Procedure_InclusaoDocSIAFEM(chave, senha, entity.NumeroSiafem, entity.NumeroDocumento, tipo) : null;

            var resultItem = entity.NumeroDocumento != null?result.FirstOrDefault() : null;

            if (!string.IsNullOrEmpty(resultItem?.outErro))
            {
                throw new SidsException(resultItem?.outErro);
            }
        }
        public bool InserirDoc(string chave, string senha, ILiquidacaoDespesa subempenho, string tipo)
        {
            try
            {
                var result = DataHelperProdespReserva.Procedure_InclusaoDocSIAFEM(chave, senha, subempenho.NumeroSiafemSiafisico, subempenho.NumeroProdesp, tipo);

                var resultItem = result.FirstOrDefault();

                if (!string.IsNullOrEmpty(resultItem?.outErro))
                {
                    throw new Exception(resultItem?.outErro);
                }

                return(!string.IsNullOrEmpty(resultItem?.outSucesso));
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 3
0
        public bool InserirDoc(string key, string password, IReserva entity, string type)
        {
            try
            {
                var result = DataHelperProdespReserva.Procedure_InclusaoDocSIAFEM(
                    key, password, entity.NumSiafemSiafisico, entity.NumProdesp, type)
                             ?? new ProdespReserva.Procedure_InclusaoDocSIAFEMRecordType[] { };

                var resultItem = result.FirstOrDefault();

                HttpContext.Current.Session["terminal"] = resultItem?.outTerminal;

                if (!string.IsNullOrEmpty(resultItem?.outErro))
                {
                    throw new Exception(resultItem?.outErro);
                }

                return(!string.IsNullOrEmpty(resultItem?.outSucesso));
            }
            catch
            {
                throw;
            }
        }
        public bool InserirDoc(string key, string password, IEmpenho entity, string type)
        {
            try
            {
                var siafemSiafisicoNumber = $"{entity.NumeroEmpenhoSiafem}{entity.NumeroEmpenhoSiafisico}";

                var result = DataHelperProdespReserva.Procedure_InclusaoDocSIAFEM(
                    key, password, siafemSiafisicoNumber, entity.NumeroEmpenhoProdesp, type)
                             ?? new ProdespReserva.Procedure_InclusaoDocSIAFEMRecordType[] { };

                var resultItem = result.FirstOrDefault();

                if (!string.IsNullOrEmpty(resultItem?.outErro))
                {
                    throw new Exception(resultItem?.outErro);
                }

                return(!string.IsNullOrEmpty(resultItem?.outSucesso));
            }
            catch
            {
                throw;
            }
        }