Files
CSharpLibrary/stuff/Login.cs
2021-09-02 08:04:56 -03:00

34 lines
911 B
C#

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();
}
}
}
}