private void lblSignIn_Click(object sender, EventArgs e)
        {
            SignInForm signInForm = new SignInForm();

            signInForm.Show();
            this.Hide();
        }
        private void btnSignUp_Click(object sender, EventArgs e)
        {
            int userRole = 0;

            if (cmbUserRole.SelectedIndex == 0)
            {
                userRole = 0;
            }
            else
            {
                userRole = 1;
            }

            AppUser appUser = new AppUser()
            {
                UserName     = txtUserName.Text,
                UserPassword = txtUserPassword.Text,
                UserEmail    = txtUserEmail.Text,
                UserRole     = userRole
            };

            bool checkSignUp = signUpController.UserSignUpControll(appUser);

            if (checkSignUp)
            {
                MessageBox.Show("Success!");
                SignInForm signInForm = new SignInForm();
                signInForm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Error!");
            }
        }
Exemplo n.º 3
0
        private void BtnSignUp_Click(object sender, EventArgs e)
        {
            AppUser appUser = new AppUser()
            {
                UserName     = txtUserName.Text,
                UserPassword = txtUserPassword.Text,
                UserEmail    = txtUserEmail.Text,
            };



            bool checkSignUp = signUpController.UserSignUpControll(appUser);

            if (checkSignUp)
            {
                MessageBox.Show("Success!");
                SignInForm signInForm = new SignInForm();
                signInForm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Error!");
            }
        }
        public void FinalReservationScreenOpen()
        {
            if (HelperStaticClass.appUserStatic is null)
            {
                SignInForm signInForm = new SignInForm();
                signInForm.Show();
            }
            else
            {
                ReservationFinalScreen reservationFinalScreen = new ReservationFinalScreen();
                reservationFinalScreen.Show();
            }

            this.Hide();
        }