Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            users user = new users(textBox1.Text, textBox2.Text);

            if (user.error == "error")
            {
                timer1.Enabled = true;
                label8.Visible = true;
                textBox2.Text  = "";
                textBox2.Select();
            }
            else
            {
                if (user.post == "registration")
                {
                    Form registration = new Registration(textBox1.Text);
                    registration.ShowDialog();
                }
                else if (user.post == "store")
                {
                    Form store = new Store(textBox1.Text);
                    store.ShowDialog();
                }
                else if (user.post == "doctor")
                {
                    Form doctor = new doctorMain(textBox1.Text);
                    doctor.ShowDialog();
                }
                else if (user.post == "dispensary")
                {
                    Form disp = new dispensaryMain(textBox1.Text);
                    disp.ShowDialog();
                }
                textBox1.Text  = "";
                textBox2.Text  = "";
                timer1.Enabled = false;
            }
        }
Пример #2
0
        private void button14_Click(object sender, EventArgs e)
        {
            Form emergency = new doctorMain(username);

            emergency.ShowDialog();
        }