Example #1
0
        private void AdminGirisButton_Click(object sender, EventArgs e)
        {
            db              connect = new db();
            MySqlCommand    kmt     = new MySqlCommand();
            MySqlDataReader dr;

            kmt.Connection  = connect.baglan();
            kmt.CommandText = "Select * FROM girisbilgi where KullaniciAdi = '" + AdminIsimTextBox.Text + "' AND Sifre = '" + AdminSifreTextBox.Text + "'";
            dr = kmt.ExecuteReader();
            if (dr.Read())
            {
                MessageBox.Show("Giriş Başarılı \nAktarılıyorsunuz ...");
                this.Hide();
                YönetimPaneli panel = new YönetimPaneli();
                panel.Show();
            }
            else
            {
                MessageBox.Show("Hatalı Kullanıcı Adı veya Şifre Girdiniz !");
            }
            kmt.Connection = connect.kapat();
        }
        public void girissorgula()
        {
            db              connect = new db();
            MySqlCommand    kmt     = new MySqlCommand();
            MySqlDataReader dr;

            kmt.Connection  = connect.baglan();
            kmt.CommandText = "Select * FROM kredikart where KartNo = '" + txtKartNo.Text + "' AND KartTip = '" + txtKartType.Text + "' AND sktt = '" + txtKartSKTT.Text + "'";
            dr = kmt.ExecuteReader();
            if (dr.Read())
            {
                MessageBox.Show("ÖDEME BAŞARILI", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
                CashForm.kontrol = true;
                this.Hide();
                Store store = new Store();
                store.Show();
            }
            else
            {
                MessageBox.Show("Bilgiler yanlış !", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            kmt.Connection = connect.kapat();
        }