ddd
This commit is contained in:
53
FrmLogin.cs
Normal file
53
FrmLogin.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using DugunSalonu.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Buffers;
|
||||
|
||||
namespace DugunSalonu
|
||||
{
|
||||
public partial class FrmLogin : Form
|
||||
{
|
||||
public FrmLogin()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void FrmLogin_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void btnVazgec_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private async void btnGiris_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (dugunsalonuContext db = new dugunsalonuContext())
|
||||
{
|
||||
var user = await db.kullanici.Where(k => k.KullaniciAdi == txtKullanici.Text && k.Aktif == true && k.Parola == txtSifre.Text).FirstOrDefaultAsync();
|
||||
if (user != null)
|
||||
{
|
||||
FrmAddKullanici f1 = new FrmAddKullanici();
|
||||
f1.Show();
|
||||
this.Hide();
|
||||
}
|
||||
else { MessageBox.Show("Hatal<61> kullan<61>c<EFBFBD> bilgileri.","Hata"); }
|
||||
//Kullanici girisKullanicisi = await db.Kullanici.Where(k => k.KullaniciAdi == txtKullanici.Text && k.Parola == txtSifre.Text).FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user