34 lines
911 B
C#
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();
|
|
}
|
|
}
|
|
}
|
|
}
|