Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Boolean b = false;

            con.Open();


            string       s   = "select * from receptionist ";
            MySqlCommand cmd = new MySqlCommand(s, con);

            MySqlDataReader d = cmd.ExecuteReader();

            while (d.Read())
            {
                string username = d["rName"].ToString();
                string password = d["rpassword"].ToString();
                string type     = d["Recptype"].ToString();
                if ((username == textBox1.Text) && (password == textBox2.Text) && (type.ToUpper() == "HR"))
                {
                    b = true;
                }
            }

            if (b == false)
            {
                MessageBox.Show("Invalid Click (Ok) to try again");
            }
            else
            {
                HR_form hrform = new HR_form();
                this.Hide();
                hrform.ShowDialog();
            }
            con.Close();
        }
Ejemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            HR_form HR = new HR_form();

            HR.ShowDialog();
        }
Ejemplo n.º 3
0
 private void button1_Click_2(object sender, EventArgs e)
 {
     this.Hide();
     HR.ShowDialog();
 }