Пример #1
0
        private void kaydetBtn_Click(object sender, EventArgs e)
        {
            if (_islem == OperasyonelIslem.Yeni)
            {
                _personel.Insert(this.Personel);
                basariliLbl.Visible = true;
                MessageBox.Show("Personel başarıyla eklendi.", "Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Personel = _personel.NewPersonel();
                personellerBindingSource.ResetBindings(true);
                personellerBindingSource.DataSource = this.Personel;
            }
            else if (_islem == OperasyonelIslem.Duzenleme)
            {
                this.Personel =
                    _personel.Update(this.Personel);
                basariliLbl.Visible = true;
                MessageBox.Show("Personel başarıyla düzenlendi.", "Başarılı", MessageBoxButtons.OK, MessageBoxIcon.Information);

                personellerBindingSource.ResetBindings(true);
                personellerBindingSource.DataSource = this.Personel;
            }
        }
Пример #2
0
 public void Insert(Personeller personeller)
 {
     _manager.Insert(personeller);
 }