Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            a = new Login(textBox1.Text, textBox2.Text);
            bool check = a.login();

            if (textBox1.Text != "" && textBox2.Text != "")
            {
                if (check == true)
                {
                    Managepatient p = new Managepatient();
                    p.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Invalid User Name or Password");
                    textBox1.BackColor = Color.Red;
                    textBox2.BackColor = Color.Red;
                    textBox1.Clear();
                    textBox2.Clear();
                }
            }
            else
            {
                MessageBox.Show("Please Specify User ID or Password");
            }
        }
        private void button4_Click(object sender, EventArgs e)
        {
            Managepatient p = new Managepatient();

            p.Show();
            this.Hide();
        }
        private void button14_Click(object sender, EventArgs e)
        {
            p1 = new patient();
            string a;

            if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && textBox8.Text != "")
            {
                if (radioButton1.Checked)
                {
                    a = "male";
                    p1.insert(textBox1.Text, textBox3.Text, textBox4.Text, textBox5.Text, (comboBox1.Text), textBox8.Text, a);
                }

                else if (radioButton2.Checked)
                {
                    a = "female";
                    p1.insert(textBox1.Text, textBox3.Text, textBox4.Text, textBox5.Text, (comboBox1.Text), textBox8.Text, a);
                }

                MessageBox.Show("Data Inserted");
            }

            else
            {
                MessageBox.Show("Error! Please Insert Complete Data");
            }

            Managepatient obj = new Managepatient();

            obj.Show();
            this.Hide();
        }