Beispiel #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            AddPersonel frm = new AddPersonel();

            frm.ShowDialog();

            dataGridViewPersonel.DataSource = null;
            dataGridViewPersonel.DataSource = HotelRepository.personels;
        }
Beispiel #2
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridViewPersonel.SelectedRows.Count == 0)
            {
                MessageBox.Show("Silinecek satırı seçiniz!");
                return;
            }

            Personel p = (Personel)dataGridViewPersonel.SelectedRows[0].DataBoundItem;

            AddPersonel frm = new AddPersonel(p);

            frm.ShowDialog();

            dataGridViewPersonel.DataSource = null;
            dataGridViewPersonel.DataSource = HotelRepository.personels;
        }