private void btnCalisan_Click(object sender, EventArgs e) { if (calisanlar == null) { calisanlar = new Kullanicilar(); } calisanlar.setCalisanStajyerState(true); menuItemClickInıt(calisanlar); }
private void btnStajyer_Click(object sender, EventArgs e) { if (stajyerler == null) { stajyerler = new Kullanicilar(); } stajyerler.setCalisanStajyerState(false); menuItemClickInıt(stajyerler); }
private void btnGiris_Click(object sender, EventArgs e) { if (strGiris == "Giriş") { if (!string.IsNullOrWhiteSpace(txtEmail.Text) && !string.IsNullOrWhiteSpace(txtSifre.Text)) { ScreenToEntity(); Kullanici exist = new KullaniciDAO().SelectOneUserByEmailAndPassword(Entity); if (exist != null) { EntityToScreen(null); kullanicilar = new Kullanicilar(); if (exist.AdminStajyer) { kullanicilar.setCalisanStajyerState(true); AnaSayfa a = new AnaSayfa(); a.FormClosed += (s, args) => this.Show(); this.Hide(); a.Show(); } else { Stajyer stj = new Stajyer(); stj.setStajyer(exist); stj.FormClosed += (s, args) => this.Show(); this.Hide(); stj.Show(); } } else { MessageBox.Show("Kullanıcı adı veya şifre yanlış"); } } else { MessageBox.Show("Boşluk girilemez"); } } else if (strGiris == "İptal") { girisAlaninaDon(); } // aC.alanTemizle(); }