Tcc visual studio 2008
frmclientes frmEstoque frmFornecedores frmlogin frmMenu frmSobre login
Public Class frmLogin
Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'EstoqueDataSet.USUARIOS' table. You can move, or remove it, as needed. Me.USUARIOSTableAdapter.Fill(Me.EstoqueDataSet.USUARIOS)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try Me.USUARIOSTableAdapter.BUSCAUSUARIO(Me.EstoqueDataSet.USUARIOS, Me.txtNome.Text)
If Me.txtNome.Text = "" Or Me.txtSenha.Text = "" Or Me.txtNome.Text <> Me.NomeTextBox.Text Or Me.txtSenha.Text <> Me.SenhaTextBox.Text Then MsgBox("LOGIN INVALIDO", MsgBoxStyle.Critical) Else If Me.txtNome.Text = Me.NomeTextBox.Text And Me.txtSenha.Text = Me.SenhaTextBox.Text Then frmMenu.lblUsuario.Text = txtNome.Text If Me.TipoTextBox.Text = "ADMINISTRADOR" Then frmMenu.lblTipo.Text = "ADMINISTRADOR" Else frmMenu.lblTipo.Text = "ADMINISTRADOR" End If
Hide() frmMenu.ShowDialog() End If End If Catch ex As Exception
End Try End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try Dim SAIR As Integer SAIR = MsgBox("TEM CERTEZA QUE DESEJA SAIR?", MsgBoxStyle.Question + MsgBoxStyle.YesNo) If SAIR = vbYes Then End End If Catch ex As Exception
End Try End Sub
End Class
Menu
Public Class frmMenu
Private Sub Timer1_Tick(ByVal sender As