Exemplo n.º 1
0
        /// <summary>
        /// Transforms the <paramref name="listViewItem"/> to a reservation.
        /// </summary>
        /// <param name="listViewItem">Selected item to transform.</param>
        private void ListViewItemToReservation(ListViewItem listViewItem)
        {
            var email         = listViewItem.SubItems[3].Text;
            var reservationId = Convert.ToInt32(listViewItem.SubItems[0].Text);

            Person      = PersonProvider.GetPersonByEmail(email);
            Reservation = ReservationProvider.GetReservationById(reservationId);
        }
        /// <summary>
        /// Transforms the <paramref name="listViewItem"/> to a reservation.
        /// </summary>
        /// <param name="listViewItem">Selected item to transform.</param>
        private void ListViewItemToReservation(ListViewItem listViewItem)
        {
            var reservationId = Convert.ToInt32(listViewItem.SubItems[0].Text);

            Reservation = ReservationProvider.GetReservationById(reservationId);
        }