Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string kAdi1 = txtkAdi.Text.Trim();

            kAdi = kAdi1;
            string adi   = txtkAdi.Text.Trim();
            string sifre = textBox2.Text.Trim();

            komut = new SqlCommand("select count (*) from tblBilgiler where kAdi = @adi and sifre = @sifre", baglan);
            komut.Parameters.AddWithValue("@adi", adi);
            komut.Parameters.AddWithValue("@sifre", sifre);
            baglan.Open();
            int sayi = int.Parse(komut.ExecuteScalar().ToString());

            baglan.Close();
            if (sayi == 0)
            {
                MessageBox.Show("Kullanıcı Girişi Hatalı. Tekrar Deneyin!", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MessageBox.Show("Başarıyla Giriş Yaptınız Sayın " + txtkAdi.Text, "GİRİŞ BAŞARILI", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Hide();
                Hesapla asd = new Hesapla();
                asd.Show();
            }
        }
Пример #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            Hesapla asd = new Hesapla();

            asd.Show();
        }