Пример #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            menuForm menu = new menuForm(currentUser, currentUserDetail, currentUserInfo);

            menu.Show();
            this.Dispose();
        }
Пример #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            try
            {
                pyApiLogin ApiLogin  = new pyApiLogin();
                User       existUser = ApiLogin.pyLogin(txtEmail.Text, txtPassword.Text);

                if (existUser != null)
                {
                    menuForm menu = new menuForm(existUser, findUserDetails(existUser), findUserInfo(existUser));
                    menu.Show();
                    this.Visible = false;
                }
                else
                {
                    MessageBox.Show("Username or password is incorrect. Please check and try again.");
                }
            }
            catch (Exception ex)
            {
                CatchExLinqToApi.myCatchException(ex, "btnLogin_Click");
            }
        }