Esempio n. 1
0
        private void btn_AddRoom_Click(object sender, EventArgs e)
        {
            this.Close();
            frm_AddEditRoom theAddEditRoom = new frm_AddEditRoom();

            theAddEditRoom.ShowDialog();
        }
Esempio n. 2
0
 private void btn_EditRoom_Click(object sender, EventArgs e)
 {
     if (dgvRooms.SelectedRows.Count > 0)
     {
         frm_AddEditRoom theAddEditRoom = new frm_AddEditRoom(true, dgvRooms.SelectedRows[0].Cells[0].Value.ToString());
         this.Close();
         theAddEditRoom.Show();
     }
     else
     {
         MessageBox.Show("Proszę zaznaczyć pokój na liście!", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }