Beispiel #1
0
 private void kaydolButon_Click(object sender, EventArgs e)
 {
     if (sayikontrol == 1)
     {
         this.Hide();
         KayitIslemleri frm3 = new KayitIslemleri();
         KayitIslemleri.durum = false;
         frm3.Show();
     }
     else if (sayikontrol == 2)
     {
         this.Hide();
         SaticiKayitIslemleri frm5 = new SaticiKayitIslemleri();
         SaticiKayitIslemleri.durum = false;
         frm5.Show();
     }
     else if (sayikontrol == 3)
     {
         this.Hide();
         YoneticiAnasayfa frm11 = new YoneticiAnasayfa();
         frm11.Show();
     }
 }
Beispiel #2
0
 private void girisyapButon_Click(object sender, EventArgs e)
 {
     if (sayikontrol == 1)
     {
         siparisim.Open();
         OleDbCommand    select   = new OleDbCommand("select * from kullanicilar", siparisim);
         OleDbDataReader kayitOku = select.ExecuteReader();
         while (kayitOku.Read())
         {
             if (kayitOku["kullaniciad"].ToString() == textBox1.Text && kayitOku["sifre"].ToString() == textBox2.Text)
             {
                 durum            = true;
                 label3.ForeColor = Color.White;
                 kullaniciId      = int.Parse(kayitOku.GetValue(0).ToString());
                 adSoyad          = kayitOku.GetValue(1).ToString();
                 kullaniciad      = kayitOku.GetValue(2).ToString();
                 sifre            = kayitOku.GetValue(3).ToString();
                 yetki            = kayitOku.GetValue(4).ToString();
                 il = kayitOku.GetValue(5).ToString();
                 this.Hide();
                 KullaniciAnasayfa frm4 = new KullaniciAnasayfa();
                 frm4.Show();
                 break;
             }
             else
             {
                 label3.ForeColor = Color.Red;
             }
         }
         siparisim.Close();
     }
     else if (sayikontrol == 2)
     {
         siparisim.Open();
         OleDbCommand    select   = new OleDbCommand("select * from saticilar", siparisim);
         OleDbDataReader kayitOku = select.ExecuteReader();
         while (kayitOku.Read())
         {
             if (kayitOku["saticikullaniciad"].ToString() == textBox1.Text && kayitOku["saticisifre"].ToString() == textBox2.Text)
             {
                 durum             = true;
                 label3.ForeColor  = Color.White;
                 saticiId          = int.Parse(kayitOku.GetValue(0).ToString());
                 saticiAdSoyad     = kayitOku.GetValue(1).ToString();
                 saticikullaniciad = kayitOku.GetValue(2).ToString();
                 saticisifre       = kayitOku.GetValue(3).ToString();
                 saticiyetki       = kayitOku.GetValue(4).ToString();
                 saticidogumtarihi = kayitOku.GetValue(5).ToString();
                 sirketadi         = kayitOku.GetValue(6).ToString();
                 this.Hide();
                 SaticiAnasayfa frm6 = new SaticiAnasayfa();
                 frm6.Show();
                 break;
             }
             else
             {
                 label3.ForeColor = Color.Red;
             }
         }
         siparisim.Close();
     }
     else if (sayikontrol == 3)
     {
         siparisim.Open();
         OleDbCommand    select   = new OleDbCommand("select * from yöneticiler", siparisim);
         OleDbDataReader kayitOku = select.ExecuteReader();
         while (kayitOku.Read())
         {
             if (kayitOku["yoneticiad"].ToString() == textBox1.Text && kayitOku["yoneticisifre"].ToString() == textBox2.Text)
             {
                 label3.ForeColor = Color.White;
                 yoneticiad       = kayitOku.GetValue(0).ToString();
                 yoneticisifre    = kayitOku.GetValue(1).ToString();
                 this.Hide();
                 YoneticiAnasayfa frm11 = new YoneticiAnasayfa();
                 frm11.Show();
                 break;
             }
             else
             {
                 label3.ForeColor = Color.Red;
             }
         }
         siparisim.Close();
     }
 }