Пример #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     doctor dc = new doctor();
     this.Hide();
     dc.ShowDialog();
     this.Close();
 }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            doctor dc = new doctor();

            this.Hide();
            dc.ShowDialog();
            this.Close();
        }
Пример #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();
        }
Пример #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();
        }
Пример #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == textBox2.Text)
     {
         string        str = "update doctor set password=:pass where docid=:id";
         OracleCommand cmd = new OracleCommand(str, conn);
         cmd.Parameters.Add("pass", OracleDbType.NVarchar2).Value = textBox1.Text;
         cmd.Parameters.Add("id", OracleDbType.Int16).Value       = int.Parse(label1.Text);
         conn.Open();
         cmd.ExecuteNonQuery();
         MessageBox.Show("updated");
         conn.Close();
         doctor f1 = new doctor();
         this.Hide();
         f1.ShowDialog();
         this.Close();
     }
     else
     {
         MessageBox.Show("you must enter the same password!!");
     }
 }
Пример #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == textBox2.Text)
            {
                string str = "update doctor set password=:pass where docid=:id";
                OracleCommand cmd = new OracleCommand(str, conn);
                cmd.Parameters.Add("pass", OracleDbType.NVarchar2).Value = textBox1.Text;
                cmd.Parameters.Add("id", OracleDbType.Int16).Value = int.Parse(label1.Text);
                conn.Open();
                cmd.ExecuteNonQuery();
                MessageBox.Show("updated");
                conn.Close();
                doctor f1 = new doctor();
                this.Hide();
                f1.ShowDialog();
                this.Close();

            }
            else
            {
                MessageBox.Show("you must enter the same password!!");
            }
        }