30 lines
756 B
C#
30 lines
756 B
C#
using WinFormsApp5.Models;
|
|
|
|
namespace WinFormsApp5
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
Ispr2525KosmyinDmLoginContext context = new();
|
|
User? user = context.Users
|
|
//.Where(user => user.Login == user_login.Text && user.Password == user_login.Text)
|
|
.InClude()
|
|
.FirstOrDefault(user => user.Login == user_login.Text);
|
|
if (user != null)
|
|
{
|
|
MessageBox.Show();
|
|
}
|
|
else
|
|
{
|
|
MessageBox.Show("íåïðàâèëüíûé ëîãèí èëè ïàðîëü");
|
|
}
|
|
}
|
|
}
|
|
}
|