Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Show();
            Ad_form af = new Ad_form();

            af.Show();
        }
Exemple #2
0
        private void Aus(string Password, string Role)
        {
            if (textBox2.Text.Equals(Password))
            {
                switch (Role)
                {
                case "Admin":
                {
                    Ad_form ad = new Ad_form();
                    ad.Show();
                    this.Hide();
                    break;
                }

                case "Student":
                {
                    St_form st = new St_form();
                    st.Show();
                    this.Hide();
                    break;
                }

                case "Teacher":
                {
                    Tc_form tc = new Tc_form();
                    tc.Show();
                    this.Hide();
                    break;
                }
                }
            }
            else
            {
                MessageBox.Show("Неверный пароль");
            }
        }