Ejemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     acc ac = new acc();
     this.Hide();
     ac.ShowDialog();
     this.Close();
 }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            acc ac = new acc();

            this.Hide();
            ac.ShowDialog();
            this.Close();
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            conn.Open();
            string strdr = "select * from doctor where docid=:id and password=:pass and status='active'";

            OracleCommand cmd = new OracleCommand(strdr, conn);

            cmd.Parameters.Add("id", textBox1.Text.ToString());
            cmd.Parameters.Add("pass", textBox2.Text.ToString());
            OracleDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                ss = (dr["DFNAME"].ToString());
                id = (dr["docid"].ToString());
                this.Hide();
                doctor f1 = new doctor();
                f1._textBox = _textBox1;

                f1.ShowDialog();
            }
            string        stremp = "select * from employee where eid=:id and password=:pass and emprule!='no'";
            OracleCommand cmdemp = new OracleCommand(stremp, conn);

            cmdemp.Parameters.Add("id", textBox1.Text.ToString());
            cmdemp.Parameters.Add("pass", textBox2.Text.ToString());
            OracleDataReader dremp = cmdemp.ExecuteReader();

            if (dremp.Read())
            {
                id = (dremp["eid"].ToString());
                if ((dremp["emprule"].ToString()) == "admin")
                {
                    this.Hide();
                    Form2 F2 = new Form2();
                    F2.Show();
                }
                else
                {
                    this.Hide();
                    acc ac = new acc();
                    ac.ShowDialog();
                }
            }

            conn.Close();
        }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            conn.Open();
            string strdr = "select * from doctor where docid=:id and password=:pass and status='active'";

            OracleCommand cmd = new OracleCommand(strdr, conn);
            cmd.Parameters.Add("id", textBox1.Text.ToString());
            cmd.Parameters.Add("pass", textBox2.Text.ToString());
            OracleDataReader dr = cmd.ExecuteReader();
            if (dr.Read())
            {
                ss = (dr["DFNAME"].ToString());
                id = (dr["docid"].ToString());
                this.Hide();
                doctor f1 = new doctor();
                f1._textBox = _textBox1;

                f1.ShowDialog();
            }
            string stremp = "select * from employee where eid=:id and password=:pass and emprule!='no'";
            OracleCommand cmdemp = new OracleCommand(stremp, conn);
            cmdemp.Parameters.Add("id", textBox1.Text.ToString());
            cmdemp.Parameters.Add("pass", textBox2.Text.ToString());
            OracleDataReader dremp = cmdemp.ExecuteReader();
            if (dremp.Read())
            {
                id = (dremp["eid"].ToString());
                if ((dremp["emprule"].ToString()) == "admin")
                {
                    this.Hide();
                    Form2 F2 = new Form2();
                    F2.Show();
                }
                else
                {
                    this.Hide();
                    acc ac = new acc();
                    ac.ShowDialog();

                }
            }

            conn.Close();
        }