示例#1
0
        private void RoomsDataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            YesNoNotification yesNo = new YesNoNotification($"Изменить статус комнаты {RoomsDataGridView["room_name", e.RowIndex].Value}: \"{RoomsDataGridView["status_id", e.RowIndex].FormattedValue}\"");

            yesNo.Owner = this;
            if (yesNo.ShowDialog() == DialogResult.Yes)
            {
                Hotels.EditRoomStatus(Convert.ToInt64(RoomsDataGridView["room_id", e.RowIndex].Value), Convert.ToInt64(RoomsDataGridView["status_id", e.RowIndex].Value));
            }
        }