예제 #1
0
        //when back button is clicked, hide reports form and show staff view form
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            var newForm = new Staff_View();

            newForm.Show();
        }
예제 #2
0
        //log in button
        //if username is Joe and password is Password123 hide the login form and show the staff view form

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "Joe" && textBox2.Text == "Password123")
            {
                this.Hide();
                var newForm = new Staff_View();
                newForm.Show();
            }
            else
            {
                //otherwise if the username is Admin and the password is Password123 hide login form and show admin view form

                if (textBox1.Text == "Admin" && textBox2.Text == "Password123")
                {
                    this.Hide();
                    var newForm = new Admin_View();
                    newForm.Show();
                }
                //if what ever is typed out in the username and password box doesn't match one of the usernames and password stated above, show a message saying "Invalid Login"
                else
                {
                    MessageBox.Show("Invalid Log In");
                }
            }
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            // pass the connection string into form so it can connect to the db
            var newForm = new Staff_View(conString);

            newForm.Show();
        }
예제 #4
0
        //when the back button is clicked, hide rooms form and show staff view form
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            // pass the constring to the next form
            var newForm = new Staff_View(conString);

            newForm.Show();
        }