Beispiel #1
0
        private void back_Click(object sender, EventArgs e)
        {
            LAB lab = new LAB();

            this.Hide();
            lab.Show();
        }
Beispiel #2
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();
             * }*/
        }