Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            subjectObject.Notify();
            string PersonCode = textBox1.Text;
            string Password   = textBox2.Text;

            IPerson personOnline = businessManager.Authentication(PersonCode, Password);

            textBox2.Text = string.Empty;

            if (personOnline is Alumnus)
            {
                textBox1.Text = string.Empty;
                new Form3().ShowDialog();
            }
            else if (personOnline is Employee)
            {
                textBox1.Text = string.Empty;
                new Form4().ShowDialog();
            }
            else
            {
                MessageBox.Show("Invalid UserName or Password");
            }

            businessManager = new BusinessManager();
        }