// 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; } }
private void AddCustomer_Click(object sender, RoutedEventArgs e) { if (lstTypes.SelectedItem != null) { SaveCustomerDetails(); } var cus = facade.CreateCustomer("新旅客", null, 0, null, null, null, null, null, null); customerlist.Add(cus); lstTypes.SelectedItem = cus; }