Пример #1
0
        // NewReservationTab - CustomerDetailsTab
        // 预订 - 旅客信息

        private void GoToReceiptBtn_Click(object sender, RoutedEventArgs e)
        {
            if (ContractsDetailsNameTbx.Text == "")
            {
                MessageBox.Show("请填写联系人姓名");
            }
            else if (ContractsDetailsPhoneNoTbx.Text == "")
            {
                MessageBox.Show("请填写联系电话");
            }
            else
            {
                BookingTab.SelectedIndex = 2;
                refreshTabsStatus();
                customer = facade.CreateCustomer(
                    ContractsDetailsNameTbx.Text,
                    null, null,
                    ContractsDetailsPhoneNoTbx.Text,
                    null,
                    ContractsDetailsCreditCardNoTbx.Text,
                    null, null, null
                    );
                reservation = facade.CreateReservation();
                RecieptDetailsNameTbx.Text         = customer.Name;
                RecieptDetailsCreditCardNoTbx.Text = customer.IDcard;
                RecieptPhoneNoTbx.Text             = customer.Phone;
                reservationNumberTbx.Text          = reservation.ID;
                DateTime date = (DateTime)StartDatePicker.SelectedDate;
                RecieptCheckInDateTbx.Text = date.ToLongDateString();
                date = (DateTime)EndDatePicker.SelectedDate;
                RecieptCheckOutDateTbx.Text     = date.ToLongDateString();
                RecieptPhoneCountryCodeTbx.Text = ContractsDetailsPhoneCountryCodeTbx.Text;
            }
        }