Пример #1
0
        private void ReturntoMainMenuButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            mainMenu f1 = new mainMenu();

            f1.ShowDialog();
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DBConnect c      = new DBConnect();
            int       result = c.Login(this.id.Text, this.password.Text);

            if (result == 1)
            {
                MessageBox.Show("Welcome Administrator");
                this.Hide();
                mainMenu f1 = new mainMenu();
                f1.ShowDialog();
            }
            else if (result == 2)
            {
                MessageBox.Show("Welcome Manager");
                this.Hide();
                employeeView f13 = new employeeView();
                f13.ShowDialog();
            }
            else if (result == 3)
            {
                MessageBox.Show("Welcome Employee");
                this.Hide();
                managerView f12 = new managerView();
                f12.ShowDialog();
            }
            else if (result == 4)
            {
                MessageBox.Show("Welcome Patron");
                this.Hide();
                patronView f11 = new patronView();
                f11.ShowDialog();
            }
            else
            {
                MessageBox.Show("Wrong password");
            }
        }