예제 #1
0
        private void btnGuestAdd_Click(object sender, RoutedEventArgs e)
        {
            service.GuestService guestService = new service.GuestService();

            Guest guest = new Guest()
            {
                GuestId            = Int32.Parse(txtGuestGuestId.Text),
                FirstName          = txtGuestFirstName.Text,
                LastName           = txtGuestLastName.Text,
                Phone              = txtGuestPhone.Text,
                Email              = txtGuestEmail.Text,
                IdentificationNo   = Int32.Parse(txtGuestIdentificationNo.Text),
                IdentificationType = txtGuestIdentificationType.Text,
                Rating             = Byte.Parse(txtGuestRating.Text)
            };

            guestService.AddGuest(guest);
        }
예제 #2
0
 // *************************************************************
 private void btnGuestLoadGrid_Click(object sender, RoutedEventArgs e)
 {
     service.GuestService guestService = new service.GuestService();
     //this.DataContext = guestService.GetAllRooms();
     dataGridGuest.ItemsSource = guestService.GetAllGuests();
 }