Esempio n. 1
0
        private void LoginBtn_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(EmailTxt.Text))
            {
                MessageBox.Show("Email yazin");
                return;
            }
            if (string.IsNullOrEmpty(TxtPassword.Text))
            {
                MessageBox.Show("Password yazin");
                return;
            }


            Customer customer = (_context.Customers.FirstOrDefault(u => u.Email == EmailTxt.Text));

            if (customer != null && Crypto.VerifyHashedPassword(TxtPassword.Text, EmailTxt.Text))
            {
                DashBoardForm dashBoard = new DashBoardForm();
                dashBoard.Show();

                this.Hide();
                return;
            }
            MessageBox.Show("Email və ya Password yalnishdir.");
        }
Esempio n. 2
0
 public LoginForm(DashBoardForm dashBoardForm)
 {
     _context = new LibraryDbContext();
     InitializeComponent();
 }