Function ReplaceString(ByVal strSearch As String, ByVal strSearchFor As String, ByVal strReplaceWith As String) As String Try '--> Busca la variable del strSearch para strSearchFor y la substituye por el strReplaceWith. Dim lngFoundLoc As Long ' Location of match. Dim lngLenRemove As Long ' Length of string being replaced. '--> Fije la longitud del texto original para saltar. lngLenRemove = Len(strSearchFor) '--> Fije la localización match.  
... Leer más »
'--> Esta funcion permite desencriptar datos que fueron encriptados con la funcion encripta. Public Function Decrypta(ByVal cTexto As String, ByVal nLlave As Integer) As String Dim nLargo As Long Dim n As Long Dim cCaracter As String Dim NewCadena As String Dim NewNumero As Long
Public datname, bakname, tstream As Object, tempFileName As Object, strES As Object Public optio As Integer Public strOpt As Object, strFileEnd As Object Public i As Long Public j, k, l As Integer Public dig_number As Long Public row_number As Long Public strTempNumber, strRndNumber As Object, strElse$, ESPassword$ Public min, max As Integer Public rndNumber, rndElse, diffNumber, sumNumber As Integer Public Lines As Long Public ES As Boolean
Public Function GeneratePassword( _ ByVal intLength As Integer, _ Optional ByVal bolWithNumber As Boolean = False, Optional ByVal bolWithUpperCase As Boolean = False, Optional ByVal bolWithAll As Boo
... Leer más »
Public Sub mySetFocus(ByVal sPage As Page, ByVal ctrl As String) Dim f As StringBuilder = New StringBuilder() f.Append("<script language='JavaScript'>") f.Append("function setFocus() {") f.Append("document.getElementById('") f.Append(ctrl) f.Append("').focus();}") f.Append(" window.onload=setFocus;") f.Append("</") f.Append("script>") sPage.ClientScript.RegisterClientScriptBlock(sPage.GetType(), "<Focus>", f.ToString()) End Sub
Public Function Validar_Email(ByVal Email As String) As Boolean Dim i As Integer, iLen As Integer, caracter As String Dim pos As Integer, bp As Boolean, iPos As Integer, iPos2 As Integer
Function Dias_Naturales(ByVal fechaIni As Date, ByVal sDias As Integer) As Date fechaIni = Format("dd/MM/yyyy", fechaIni) 'Dias_Naturales = DateDiff(("d"), fechaIni, fechaFin) Dias_Naturales = DateAdd(DateInterval.Day, sDias, fechaIni) End Function
Function El_Dia_es_habil(ByVal fechaIni As Date, ByVal fechaFin As Date) As Integer Dim i As Integer Dim sDiasNoHabil As Integer Dim sDias As Integer Dim DayOfWeek As FirstDayOfWeek
'--> Abrir RecordSet con Ado Public Function AbreRS(ByVal sConsulta As String, ByVal cnSistema As ADODB.Connection, ByVal sTipoMotor As Integer) As ADODB.Recordset '--> Establecer base de datos que esta utilizando On Error GoTo ErrorAbrers
AbreRS = New ADODB.Recordset '--> SQL Server If sTipoMotor = 0 Then With AbreRS .let_Source(sConsulta) .ActiveConnection = cnSistema .CacheSize = 50 &
... Leer más »
'--> Abrir base de datos con Ado Public Function AbreBD(ByVal Source As String, ByVal BaseDatos As String, ByVal User As String, ByVal Contraseña As String, ByVal sTipoMotor As Integer) As ADODB.Connection '--> Abrir una base de datos On Error GoTo ErroresAbrirBD
AbreBD = New ADODB.Connection If sTipoMotor = 0 Then '--> Abrir base de datos en SQL Server With AbreBD .ConnectionString = "Provider=SQLOLEDB;Password=" & Contraseña & ";Persist Security Info=True;User ID=" & User & ";Initial Catalog=" & BaseDatos & ";Data Source=" & Source & "" &
... Leer más »
'--------------------------------------------------------------------- ' EncryptString ' Optimizing by Harvey T. ' Corregido por Miguel A. Vallejo Duran '--------------------------------------------------------------------- Public Const ENCRYPT As Integer = 1, DECRYPT As Integer = 2
Function EncryptString(ByVal Text As String, ByVal Action As Single, ByVal UserPassword As String) As String Dim UserKey As String Dim Temp As Integer 'Dim Times As Integer Dim i As Integer Dim j As Integer Dim n As Integer Dim rtn As Stri
... Leer más »