private void btnKaydet_Click(object sender, EventArgs e) { if (!BosKayitKontrol()) { MessageBox.Show("Lütfen Zorunlu Alanları Doldurunuz..."); } else { _calisan = new Calisan { Adi = tbxAdi.Text, SoyAdi = tbxSoyAdi.Text, TCKimlikNo = tbxTCKimlikNo.Text, PersonelNo = tbxPersonelNo.Text, DogumTarihi = dateDogumTarihi.Value, Departman = cbxDepartman.Text, Unvan = cbxUnvan.SelectedItem.ToString(), Durumu = cbxDurumu.Text }; bool islem = _calisanDal.Kaydet(_calisan); if (islem) { dgwCalisanlar.DataSource = _calisanDal.Listele("where Durumu = 'Aktif Çalışan'"); GridViewDuzenle(); AlanlariTemizle(); MessageBox.Show("Kayıt İşlemi Yapıldı..."); } } }