예제 #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)
                {
                    Managenurse n = new Managenurse();
                    n.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 button5_Click(object sender, EventArgs e)
        {
            Managenurse n = new Managenurse();

            n.Show();
            this.Hide();
        }
예제 #3
0
        private void button14_Click(object sender, EventArgs e)
        {
            n1 = new Nurse();
            string a;

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

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

                MessageBox.Show("Data Inserted");
            }

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

            Managenurse obj = new Managenurse();

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