Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Doctor doc = new Doctor();
            CHW    chw = new CHW();

            if (textBox1.Text == "DOC" && textBox2.Text == "123")
            {
                // Doc Form
                doc.Size = new Size(898, 592);
                doc.Show();
                Hide();
            }
            else
            if (textBox1.Text == "CHW" && textBox2.Text == "123")

            {
                //CW Form
                chw.Size = new Size(898, 592);
                chw.Show();
                Hide();
            }
            else
            {
                MessageBox.Show("Username or password is incorrect");
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Doctor doc = new Doctor();
            CHW    chw = new CHW();

            if (textBox1.Text == "DoctorStar" && textBox2.Text == "qwerty")
            {
                // Doc Form
                doc.Show();
                Hide();
            }
            else
            if (textBox1.Text == "CommunityWorker" && textBox2.Text == "123456")

            {
                //CW Form
                chw.Show();
                Hide();
            }
            else
            {
                MessageBox.Show("Username or password is incorrect");
            }
        }