Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Recepitionist rec = new Recepitionist();

            this.Hide();
            rec.Show();
        }
Exemple #2
0
        private void back_Click(object sender, EventArgs e)
        {
            Recepitionist res = new Recepitionist();

            this.Hide();
            res.Show();
        }
Exemple #3
0
        private void LOGIN_Click(object sender, EventArgs e)
        {
            SqlDataAdapter sda = new SqlDataAdapter("Select Count(*) From tbl_Admin where id='" + username.Text + "'and department='" + comboBox1.Text + "'and password='******'", con);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            if (dt.Rows[0][0].ToString() == "1")
            {
                this.Hide();
                if (comboBox1.Text == "Recepitionist")
                {
                    Recepitionist rec = new Recepitionist();

                    rec.Show();
                }
                else if (comboBox1.Text == "Laboratory")
                {
                    LAB lab = new LAB();
                    lab.Show();
                }
            }
            else
            {
                MessageBox.Show("Check ID or PASSWORD!");
            }


            /* if (username.Text == "1")
             * {
             *   Recepitionist rec = new Recepitionist();
             *
             *   rec.Show();
             * }
             * else if (username.Text == "2")
             * {
             *   LAB lab = new LAB();
             *   lab.Show();
             * }*/
        }