Пример #1
0
        public static Int16 IngresaError(ENError objError)
        {
            Database ConexionSeguridad = null;
            Int16    lnRespuesta       = 0;

            try
            {
                ConexionSeguridad = ADConexionBD.CrearObjectoBaseDatosSeguridad();
                DbCommand Cmd = ConexionSeguridad.GetStoredProcCommand("IngresardetError", objError.Clase,
                                                                       objError.Metodo, objError.Sentencia, objError.Descripcion
                                                                       , objError.Usuario);
                lsSentencia = SUFunciones.ObtieneSentenciaSQL(Cmd);
                ConexionSeguridad.ExecuteNonQuery(Cmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lnRespuesta);
        }
Пример #2
0
        public static int EliminaSesion(Guid IdSesion)
        {
            Database ConexionSeguridad = null;
            int      nResultado        = 0;

            try
            {
                ConexionSeguridad = ADConexionBD.CrearObjectoBaseDatosSeguridad();
                DbCommand Cmd = ConexionSeguridad.GetStoredProcCommand("spEliminaSesion", IdSesion);
                lsSentencia = SUFunciones.ObtieneSentenciaSQL(Cmd);
                nResultado  = SUConversiones.ConvierteAInt32(ConexionSeguridad.ExecuteScalar(Cmd));
            }
            catch (Exception ex)
            {
                lsNombreMetodo = (new System.Diagnostics.StackFrame().GetMethod()).ToString();
                objError       = new ENError(lsNombreClase, lsNombreMetodo, lsSentencia, ex.Message.ToString());

                ADError.IngresaError(objError);
                throw ex;
            }
            return(nResultado);
        }
Пример #3
0
        public static DataTable ObtieneHistorialSesiones()
        {
            Database  ConexionSeguridad = null;
            DataTable dtDatos           = null;

            try
            {
                ConexionSeguridad = ADConexionBD.CrearObjectoBaseDatosSeguridad();
                DbCommand Cmd = ConexionSeguridad.GetStoredProcCommand("spObtieneHistorialSesionTodos");
                lsSentencia = SUFunciones.ObtieneSentenciaSQL(Cmd);
                dtDatos     = SUFunciones.ObtieneDataTableDeDataSet(ConexionSeguridad.ExecuteDataSet(Cmd));
            }
            catch (Exception ex)
            {
                lsNombreMetodo = (new System.Diagnostics.StackFrame().GetMethod()).ToString();
                objError       = new ENError(lsNombreClase, lsNombreMetodo, lsSentencia, ex.Message.ToString());

                ADError.IngresaError(objError);
                throw ex;
            }
            return(dtDatos);
        }