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

            frm.ShowDialog();
            dataGridViewRoom.DataSource = null;
            dataGridViewRoom.DataSource = HotelRepository.rooms;
        }
Beispiel #2
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridViewRoom.SelectedRows.Count == 0)
            {
                MessageBox.Show("Silenecek satırıseçin!");
                return;
            }

            Room    p   = (Room)dataGridViewRoom.SelectedRows[0].DataBoundItem;
            AddRoom frm = new AddRoom(p);

            frm.ShowDialog();
            dataGridViewRoom.DataSource = null;
            dataGridViewRoom.DataSource = HotelRepository.rooms;
        }