private void FormSiparis_Load(object sender, EventArgs e) { FormYonetici FY = new FormYonetici(); FY.Show(); StreamReader SWad = new StreamReader(Application.StartupPath + "\\Urunler.txt"); while ((satir = SWad.ReadLine()) != null) { listboxUrun.Items.Add(satir); } SWad.Close(); //URUN AGİRLİGİNİ OKUDUK LİSTBOXA ATTIK StreamReader SWUrunAgirlik = new StreamReader(Application.StartupPath + "\\UrunAgirligi.txt"); while ((satir = SWUrunAgirlik.ReadLine()) != null) { listboxUrunAgirlik.Items.Add(satir); } SWUrunAgirlik.Close(); //URUN FİYATINI OKUDUK LİSTBOXA ATTIK StreamReader SWFiyat = new StreamReader(Application.StartupPath + "\\Fiyat.txt"); while ((satir = SWFiyat.ReadLine()) != null) { listboxFiyat.Items.Add(satir); } SWFiyat.Close(); //KARGO AGİRLİGİNİ OKUDUK LİSTBOXA ATTIK StreamReader SWKargoAgirlik = new StreamReader(Application.StartupPath + "\\KargoAgirligi.txt"); while ((satir = SWKargoAgirlik.ReadLine()) != null) { listboxKargoAgirligi.Items.Add(satir); } SWKargoAgirlik.Close(); //URUNUN VERGİ ORANINI OKUDUK LİSTBOXA ATTIK StreamReader SWVergiOrani = new StreamReader(Application.StartupPath + "\\VergiOrani.txt"); while ((satir = SWVergiOrani.ReadLine()) != null) { listboxVergiOrani.Items.Add(satir); } SWVergiOrani.Close(); }
private void btnYoneticiGiris_Click(object sender, EventArgs e) { //Yonetici Paneli Giriş İD || ŞİFRESİ if (txtYoneticiAdi.Text == "admin") { if (txtYoneticiSifre.Text == "00000") { FormYonetici FY = new FormYonetici(); FY.Show(); FormSiparis FS = new FormSiparis(); FS.Show(); } } else { MessageBox.Show("HATALI YONETİCİ GİRİSİ", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error); } }