Pesquisar na Comunidade
Mostrando resultados para as tags ''Código do vb 6 para o vb 2010''.
Encontrado 1 registro
-
Public Class CadFuncionario Dim VeriFI As Boolean Dim Tabfun As New ADODB.Recordset Private Sub CadFuncionario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'On Error Resume Next CONEXAO = New ADODB.Connection CONEXAO.Open("DSN=os", , "jacare") Call AtualizaFuncionario() If Tabfun.RecordCount > 0 Then Call BuscaFuncionario(Tabfun.Fields("CodFuncio").Value) End If End Sub Private Sub AtualizaFuncionario() Tabfun = New ADODB.Recordset Tabfun.ActiveConnection = CONEXAO Tabfun.Source = "select * from TBFucionario" Tabfun.CursorType = CursorTypeEnum.adOpenKeyset Tabfun.LockType = LockTypeEnum.adLockOptimistic Tabfun.Open() End Sub Private Sub BuscaFuncionario(ByVal cod As Long) 'On Error Resume Next Dim Tabfun As ADODB.Recordset Tabfun = New ADODB.Recordset Tabfun.ActiveConnection = CONEXAO Tabfun.Source = "select * from TBFucionario where CodFuncio=" & cod Tabfun.CursorType = CursorTypeEnum.adOpenKeyset Tabfun.LockType = LockTypeEnum.adLockOptimistic Tabfun.Open() If Tabfun.RecordCount > 0 Then FuCodigo.Text = Format(Tabfun.Fields("CodFuncio").Value, "000#") ' FuNome.Text = IIf(IsNull(Tabfun.Fields("Funcionario")), "", Tabfun.Fields("Funcionario")) ' CPF.Text = IIf(IsNull(Tabfun.Fields("CPF")), "", Tabfun.Fields("CPF")) ' RG.Text = IIf(IsNull(Tabfun.Fields("rg")), "", Tabfun.Fields("rg")) ' DataNasc.Text = IIf(IsNull(Tabfun.Fields("DataNasc")), "", Tabfun.Fields("DataNasc")) ' DataNasc.Text = Format(DataNasc.Text, "dd/mm/yyyy") ' Endereco.Text = IIf(IsNull(Tabfun.Fields("Endereco")), "", Tabfun.Fields("Endereco")) ' Numero.Text = IIf(IsNull(Tabfun.Fields("Numero")), "", Tabfun.Fields("Numero")) ' Bairro.Text = IIf(IsNull(Tabfun.Fields("Bairro")), "", Tabfun.Fields("Bairro")) ' Referencia.Text = IIf(IsNull(Tabfun.Fields("Referencia")), "", Tabfun.Fields("Referencia")) 'Cidade.Text = IIf(IsNull(Tabfun.Fields("Cidade")), "", Tabfun.Fields("Cidade")) ' UF.Text = IIf(IsNull(Tabfun.Fields("UF")), "", Tabfun.Fields("UF")) ' Telefone.Text = IIf(IsNull(Tabfun.Fields("Telefone")), "", Tabfun.Fields("Telefone")) ' Celular.Text = IIf(IsNull(Tabfun.Fields("Celular")), "", Tabfun.Fields("Celular")) ' Email.Text = IIf(IsNull(Tabfun.Fields("Email")), "", Tabfun.Fields("Email")) ' sexo.Text = IIf(IsNull(Tabfun.Fields("Sexo")), "", Tabfun.Fields("Sexo")) ' estadocivil.Text = IIf(IsNull(Tabfun.Fields("EstadoCivil")), "", Tabfun.Fields("EstadoCivil")) ' CEP.Text = IIf(IsNull(Tabfun.Fields("CEP")), "", Tabfun.Fields("CEP")) ' Login.Text = IIf(IsNull(Tabfun.Fields("Login")), "", Tabfun.Fields("Login")) ' SenhaEntrada.Text = IIf(IsNull(Tabfun.Fields("Senha")), "", Tabfun.Fields("Senha")) ' Acesso.Caption = IIf(IsNull(Tabfun.Fields("login")), "", Tabfun.Fields("login")) Else ' Funcionario.Text = "" ' CPF.Text = "" ' Endereco.Text = "" ' Bairro.Text = "" ''Cidade.Text = "" ' CEP.Text = "" ' RG.Text = "" ' DataNasc.Text = "" ' Referencia.Text = "" ' Celular.Text = "" ' Telefone.Text = "" ' Numero.Text = "" ' Email.Text = "" ' UF.Text = "" ' sexo.Text = "" ' estadocivil.Text = "" ' Login.Text = "" 'SenhaEntrada.Text = "" 'F() 'rame3.Visible = False ' Frame2.Top = 4080 ' CadFucionario.Height = 5340 Tabfun.Close() Tabfun = Nothing End If End Sub End Class