Ejemplo n.º 1
0
        protected void RegistrarLog(Exception ex, OperacoesSAP operacao, int IdTransacaoSap = 0)
        {
            var SQL = new StringBuilder();

            SQL.AppendLine("INSERT INTO dbo.tb_sap_erros(id_transacao_sap, metodo, mensagem)");
            SQL.AppendFormat("VALUES({0}, '{1}', '{2}')", IdTransacaoSap, operacao.ToString(), ex.Message);

            try
            {
                var result = ExecutaSQL(SQL.ToString());
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Ejemplo n.º 2
0
        protected void RegistrarSolicitacao(int transacao_sap, OperacoesSAP operacao, int id_grv = 0, int id_atendimento = 0, int id_lote = 0)
        {
            var SQL = new StringBuilder();

            var teste = ConsultaSQL("select db_name()");

            SQL.AppendLine("INSERT INTO dbo.tb_sap_solicitacao(id_transacao_sap, operacao, id_grv, id_atendimento, id_lote)");
            SQL.AppendFormat("VALUES({0}, '{1}', {2}, {3}, {4})", transacao_sap, operacao.ToString(), id_grv, id_atendimento, id_lote);

            try
            {
                var result = ExecutaSQL(SQL.ToString());
            }
            catch (Exception)
            {
                throw;
            }
        }