Beispiel #1
0
        /// <summary>
        /// Logs In User
        /// </summary>
        private void registerBtn_Click(object sender, EventArgs e)
        {
            var user = Datalog.loggedUser[0];

            createAccount(user);
            MessageBox.Show("Account Registered, Choose an account to continue");
            this.Hide();
            SelectAccount select = new SelectAccount(_authRepository, _userRepository, _accountRepository, _context);

            select.Show();
        }
Beispiel #2
0
        /// <summary>
        /// User Login
        /// </summary>
        private void loginBtn_Click(object sender, EventArgs e)
        {
            var email    = txtEmail.Text;
            var password = txtPassword.Text;

            try
            {
                _authRepository.Login(email, password);
                MessageBox.Show("Login Successful");
                this.Hide();
                SelectAccount select = new SelectAccount(_authRepository, _userRepository, _accountRepository, _context);
                select.Show();
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message);
            }
        }