Beispiel #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            var bookMngtForm = new frmBookMngt(_user);

            bookMngtForm.Show();
            this.Close();
        }
Beispiel #2
0
        /// <summary>
        /// User clicks to access the Book Store.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var user = _userService.GetLogin(txtUserName.Text, txtPassword.Text);

            if (user != null)
            {
                lblErrorMessage.Text = String.Empty;
                var bookForm = new frmBookMngt(user);
                bookForm.Show();
                this.Hide();
            }

            else
            {
                lblErrorMessage.Text = "Your email or password is not correct.";
            }
        }