Example #1
0
        public bool IsSaveEnabled()
        {
            bool validRoom      = Room.SelectedIndex > 0;
            bool validGuest     = GuestName.Validate();
            bool validGuests    = GuestsInRoom.Validate();
            bool validNights    = Nights.Validate();
            bool validTotal     = TotalPrice.Validate();
            bool validPaid      = PaidSum.Validate();
            bool validRemaining = RemainingSum.Validate();

            return(validRoom && validGuest && validGuests && validNights && validTotal && validPaid && validRemaining);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (GuestName != null ? GuestName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (GuestPhone != null ? GuestPhone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (GuestMailingAddress != null ? GuestMailingAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DateAttending != null ? DateAttending.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CardNumber != null ? CardNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CardExpirationDate != null ? CardExpirationDate.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CardVerificationValue != null ? CardVerificationValue.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #3
0
 private void GuestName_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (GuestName.Validate())
     {
         string[] guestInfo = GuestName.AutoSuggestionList.FirstOrDefault(g => g[0] == GuestName.AutoTextBox.Text);
         Phone.Text    = guestInfo?[1] ?? string.Empty;
         Email.Text    = guestInfo?[2] ?? string.Empty;
         ResCount.Text = guestInfo?[3] ?? "0";
     }
     if (GuestReferrer.AutoTextBox.Text == GuestName.AutoTextBox.Text)
     {
         Save.IsEnabled = false;
         GuestReferrer.AutoTextBox.Background = new SolidColorBrush(Colors.Bisque);
         return;
     }
     GuestReferrer.AutoTextBox.Background = new SolidColorBrush(Colors.White);
     Save.IsEnabled = IsSaveEnabled();
 }
Example #4
0
 public string Slug()
 {
     return(string.Concat(EpisodeNumber, "_", GuestName.Replace(" ", "_")));
 }
 private void CopyLink_OnClick(object sender, RoutedEventArgs e)
 {
     try
     {
         Clipboard.SetText(Interaction.VidyoRoomUrl + "&guestName=" + HttpUtility.UrlEncode(GuestName.Trim()));
         GuestName = "";
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
         Trace.Main.exception(ex);
     }
 }
 private void OkButton_Click(object sender, RoutedEventArgs e)
 {
     GuestName?.Invoke(this.TextBox.Text);
     this.TextBox.Text = "";
 }