Esempio n. 1
0
        private void btnSelectGuest_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = (DataGridViewRow)dgvGuests.Rows[dgvGuests.SelectedCells[0].RowIndex];

            if (row.Cells[4].Value.ToString() == Globals.hotelCountry)
            {
                Guest guest = new NationalGuest();
                guest.Id        = int.Parse(row.Cells["guest_id"].Value.ToString());
                guest.FirstName = row.Cells["First Name"].Value.ToString();
                guest.LastName  = row.Cells["Last Name"].Value.ToString();
                guest.Email     = row.Cells["Email"].Value.ToString();
                this.Guest      = guest;
            }
            else
            {
                Guest guest = new InternationalGuest();
                guest.Id        = int.Parse(row.Cells["guest_id"].Value.ToString());
                guest.FirstName = row.Cells["First Name"].Value.ToString();
                guest.LastName  = row.Cells["Last Name"].Value.ToString();
                guest.Email     = row.Cells["Email"].Value.ToString();
                this.Guest      = guest;
            }
            this.Close();
            var form = new CheckinFrm(this.ReservationId, this.Guest, this.ReservationApartmentId);

            form.Show();
        }
Esempio n. 2
0
 private void SelectRoomFrm_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (this.Apartment != null)
     {
         var form = new CheckinFrm(this.ReservationId, this.Guest, this.Apartment, this.ReservationApartmentId);
         form.Show();
     }
     else
     {
         var form = new CheckinFrm(this.ReservationId, this.Guest, this.ReservationApartmentId);
         form.Show();
     }
 }