initial commit
This commit is contained in:
33
stuff/Login.cs
Normal file
33
stuff/Login.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using ProjetoLPVIII;
|
||||
using CSharpLibrary.SqlTypes;
|
||||
|
||||
namespace TelasProjeto
|
||||
{
|
||||
public partial class FormLogin : Form
|
||||
{
|
||||
public FormLogin()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnAcessar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Funcionario f = ReturnTypes.AReturnFuncionarioByName(txtUsuario.Text);
|
||||
if (ReturnTypes.CheckLogin(txtUsuario.Text, txtSenha.Text) && f.STATUS_PESSOA=="ATIVO")
|
||||
{
|
||||
MessageBox.Show("Login com Sucesso!");
|
||||
|
||||
Form1 frm = new Form1(f);
|
||||
frm.Show();
|
||||
this.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Login errado! Tente Novamente");
|
||||
txtSenha.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user