Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ChooseMovie chooseMovie = new ChooseMovie(label8.Text);

            chooseMovie.ShowDialog();
            this.Close();
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            ChooseMovie chooseMovie = new ChooseMovie(user_name);

            chooseMovie.ShowDialog();
            this.Close();
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            name = textBox1.Text;
            pass = Encrypt(textBox3.Text);


            if (LogIn_user(name, pass))
            {
                if (IsStaff(name, pass))
                {
                    ChooseMovie chooseMovie = new ChooseMovie(name);
                    chooseMovie.ShowDialog();
                    this.Close();
                }
                else if (IsManager(name, pass))
                {
                    AdminPanel adminPanel = new AdminPanel();
                    adminPanel.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("Something wrong.");
            }
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            name  = textBox1.Text;
            email = textBox2.Text;
            if (IsValidEmail(email))
            {
                if (textBox3.Text == textBox4.Text)
                {
                    pass = Encrypt(textBox3.Text);
                    if (radioButton1.Checked)
                    {
                        employee_type = radioButton1.Text;
                    }
                    else if (radioButton2.Checked)
                    {
                        employee_type = radioButton2.Text;
                    }

                    if (Register_user(name, email, pass, employee_type))
                    {
                        if (IsManager(name, pass))
                        {
                            AdminPanel adminPanel = new AdminPanel();
                            adminPanel.ShowDialog();
                            this.Close();
                        }
                        else if (IsStaff(name, pass))
                        {
                            ChooseMovie chooseMovie = new ChooseMovie(name);
                            chooseMovie.ShowDialog();
                            this.Close();
                        }
                    }
                    else
                    {
                        MessageBox.Show($"{name} has not been created.");
                    }
                }
                else if (textBox3.Text != textBox4.Text)
                {
                    MessageBox.Show("Password Doesn't Match");
                }
            }
            else
            {
                MessageBox.Show("Wrong Email Format");
            }
        }