private void button2_Click(object sender, EventArgs e) { frmmasasatis fpt = new frmmasasatis(); fpt.Show(); this.Hide(); }
private void btnGiris_Click(object sender, EventArgs e) { Kullanici kullanici = db.Kullanici.Where(x => x.eposta == txt_eposta.Text && x.sifre == txt_sifre.Text).SingleOrDefault(); if (kullanici == null) { MessageBox.Show("Kullanıcı bulunamadı.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { Program.kullanici = kullanici; if (Program.kullanici.yetki == "Patron") { frmmasasatis fpt = new frmmasasatis(); fpt.Show(); this.Hide(); } else if (Program.kullanici.yetki == "Personel") { frmmasasatis fpr = new frmmasasatis(); fpr.Show(); this.Hide(); } } }