private void button1_Click(object sender, EventArgs e)
        {
            connection.Open();
            satıcıID = Convert.ToInt32(satıcı_ıd.Text);
            String        üyePass = satıcı_sifre.Text;
            OracleCommand cmd     = new OracleCommand();

            cmd.Connection  = connection;
            cmd.CommandText = "SELECT * FROM SATICI WHERE SATICI_ID= " + satıcıID + "AND SATICI_PASS = '******'";
            cmd.CommandType = CommandType.Text;
            OracleDataReader dr = cmd.ExecuteReader();

            if (dr.Read())
            {
                satıcıAd    = dr.GetValue(1).ToString();
                satıcıPass  = üyePass;
                satıcıNum   = dr.GetValue(3).ToString();
                satıcıAdres = dr.GetValue(4).ToString();
                toplam_ilan = dr.GetInt32(5);
                this.Hide();
                var UyeIslemEkran = new UyeIslem();
                UyeIslemEkran.Closed += (s, args) => this.Close();
                UyeIslemEkran.Show();
                connection.Close();
            }
            else
            {
                MessageBox.Show("ID veya Şifre yanlış!");
                connection.Close();
            }
        }
示例#2
0
        private void güncelleButon_Click(object sender, EventArgs e)
        {
            String ad, pass, num, adres;

            ad    = textBox2.Text;
            pass  = textBox3.Text;
            num   = textBox4.Text;
            adres = textBox5.Text;
            connection.Open();
            OracleCommand cmd = new OracleCommand();

            cmd.Connection  = connection;
            cmd.CommandText = "UPDATE SATICI SET SATICI_AD = '" + ad + "', SATICI_PASS = '******', SATICI_NUMARA = '" + num + "', SATICI_ADRES = '" + adres + "' WHERE SATICI_ID = " + Form1.satıcıID;
            cmd.CommandType = CommandType.Text;
            int sonuc = cmd.ExecuteNonQuery();

            if (sonuc == 1)
            {
                MessageBox.Show("GÜNCELLEME BAŞARILI!");
                Form1.satıcıAd    = textBox2.Text;
                Form1.satıcıNum   = textBox4.Text;
                Form1.satıcıPass  = textBox3.Text;
                Form1.satıcıAdres = textBox5.Text;
                connection.Close();
                this.Hide();
                var UyeIslemEkran = new UyeIslem();
                UyeIslemEkran.Closed += (s, args) => this.Close();
                UyeIslemEkran.Show();
            }
            else
            {
                MessageBox.Show("GÜNCELLEME BAŞARISIZ!");
            }
            connection.Close();
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            var UyeIslemEkran = new UyeIslem();

            UyeIslemEkran.Closed += (s, args) => this.Close();
            UyeIslemEkran.Show();
        }