Exemple #1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var email    = txtEmail.Text.Trim();
            var password = txtUserPassword.Text.Trim();

            try
            {
                if (string.IsNullOrWhiteSpace(email) || string.IsNullOrWhiteSpace(password))
                {
                    MessageBox.Show("Zəhmət olmasa bütün xanaları doldurun!!");
                }
                else
                {
                    var checkUser = db.Users.Where(a => a.DeletedDate == null && a.UserEmail == email).FirstOrDefault();
                    if (checkUser == null)
                    {
                        MessageBox.Show("Bu istifadəçi Mövcut Deyil!!");
                    }
                    else
                    {
                        //var checkPassword = Extention.Extention.CheckPassword(password,checkUser.UserPassword);
                        if (checkUser.UserPassword != password /*checkPassword==false*/)
                        {
                            MessageBox.Show("Zəhmət olmasa şifrəni düzgün daxil edin!!");
                        }
                        else
                        {
                            MarketForm marketList = new MarketForm(checkUser);
                            marketList.Show();
                            this.Hide();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Please, check again after some minutes!! ");
                File.AppendAllText(pathTxt, "\n" + ex + ":" + DateTime.Now);
            }
        }
Exemple #2
0
        private void CreateMarket_FormClosing(object sender, FormClosingEventArgs e)
        {
            MarketForm marketForm = new MarketForm(activeUser);

            marketForm.Show();
        }