Esempio n. 1
0
        public DataSet BuscarConfiguracao(CaseBusiness.Framework.App aplicacao, Int32 numeroCluster)
        {
            DataSet ds = null;

            try
            {
                persiste.AddParameter("@T0083_CD_APLICACAO", (Int32)aplicacao);
                persiste.AddParameter("@T0091_NR_CLUSTER", numeroCluster);
                ds = persiste.ExecuteDataSet(CommandType.StoredProcedure, "PR_CONFIGURACAO_SEL_T0091_APLI");
            }
            catch (System.Exception ex)
            {
                CaseBusiness.Framework.Log.Log.LogarArquivo("Erro(CarregarConfiguracao): " + ex.Message, CaseBusiness.Framework.Log.TipoEventoLog.Erro, "Case Framework");
            }

            return(ds);
        }
Esempio n. 2
0
        public Int32 Logar(TipoLog tipoLog, String mensagem, String stackTrace, String campo, String tipoErroFisico, DateTime dataHora, App aplicacao, Tela tela, Int64 cdLogTransacao)
        {
            Int32         log = 0;
            List <Object> r   = null;

            try
            {
                persiste.AddParameter("@LOG_DS_MENSAGEM", mensagem);
                persiste.AddParameter("@LOG_DS_STACK_TRACE", stackTrace);
                persiste.AddParameter("@LOG_DS_CAMPO", campo.ToString());
                persiste.AddParameter("@LOG_TP_ERRO_FISICO", tipoErroFisico);
                persiste.AddParameter("@LOG_DH", dataHora);
                //persiste.AddParameter("@T0082_CD_TELA", (Int32)tela);
                persiste.AddParameter("@LOG_DS_APLICACAO", aplicacao.ToString());

                if (cdLogTransacao > 0)
                {
                    persiste.AddParameter("@MSG_ID", cdLogTransacao);
                }
                else
                {
                    persiste.AddParameter("@MSG_ID", DBNull.Value);
                }

                persiste.AddParameter("@LOG_DS_TIPO", tipoLog.ToString());
                persiste.AddParameter("@LOG_ID", Int32.MinValue, ParameterDirection.Output);

                r = persiste.ExecuteNonQueryComRetorno(CommandType.StoredProcedure, "prLOG_INS");

                log = Convert.ToInt32(r[0]);
            }
            catch (System.Exception ex)
            {
                CaseBusiness.Framework.Log.Log.LogarArquivo("Erro: " + ex.Message + " " + ex.StackTrace, CaseBusiness.Framework.Log.TipoEventoLog.Erro, "Case Framework");
                throw;
            }

            return(log);
        }