public string InserirEmpenho(string key, string password, Empenho entity, IEnumerable <IMes> months, Programa program, Estrutura structure, Fonte source, Regional regional)
        {
            try
            {
                var result = DataHelperProdespEmpenho.Procedure_InclusaoEmpenho(
                    key, password, entity, months, program, structure, source, regional)
                             ?? new ProdespEmpenho.Procedure_InclusaoEmpenhoRecordType[] { };

                var resultItem = result.FirstOrDefault();

                if (HttpContext.Current != null)
                {
                    HttpContext.Current.Session["terminal"] = resultItem?.outTerminal;
                }

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

                return(resultItem?.outNumEmpenho);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message.Contains("EntradaCICS_Fora")
                    ? "Erro na comunicação com WebService Prodesp."
                    : ex.Message);
            }
        }