Exemple #1
0
 private void PictureBox_AddAdditionalPhoneNumber_Click(object sender, EventArgs e)
 {
     PictureBox_AddAdditionalPhoneNumber.Hide();
     PictureBox_DeleteAdditionalPhoneNumber.Show();
     TextBox_AdditionalPhoneNumber.Show();
     Label_AdditionalPhoneNumber.Show();
 }
 private bool addParticipantData()
 {
     ComboBox_Events.SelectedIndex = mainWindow.events.FindIndex(ev => ev.eventName.Equals(templateParticipatEvent.eventName));
     //participant.TextBox_FirstName = this.TextBox_FirstName;
     //participant.TextBox_LastName = this.TextBox_LastName;
     TextBox_JobTitle.Text              = templateParticipat.jobTitle;
     TextBox_CompanyName.Text           = templateParticipat.companyName;
     ComboBox_CompanyType.SelectedIndex = ComboBox_CompanyType.Items.IndexOf(templateParticipat.companyType);
     TextBox_Email.Text       = templateParticipat.email;
     TextBox_PhoneNumber.Text = templateParticipat.phoneNumber;
     if (templateParticipat.additionalPhoneNumber.Length > 0)
     {
         TextBox_AdditionalPhoneNumber.Text = templateParticipat.additionalPhoneNumber;
         PictureBox_AddAdditionalPhoneNumber.Hide();
         Label_AdditionalPhoneNumber.Show();
         TextBox_AdditionalPhoneNumber.Show();
         PictureBox_DeleteAdditionalPhoneNumber.Show();
     }
     else
     {
         Label_AdditionalPhoneNumber.Hide();
         TextBox_AdditionalPhoneNumber.Hide();
         PictureBox_DeleteAdditionalPhoneNumber.Hide();
     }
     TextBox_Country.Text                           = templateParticipat.country;
     TextBox_Comment.Text                           = templateParticipat.comment;
     DateTime_PaymentDate.Value                     = templateParticipat.paymentDate;
     DateTime_RegistrationDate.Value                = templateParticipat.registrationDate;
     TextBox_PaymentAmount.Text                     = templateParticipat.paymentAmount.ToString();
     ComboBox_ParticipationFormat.SelectedIndex     = ComboBox_ParticipationFormat.Items.IndexOf(templateParticipat.participationFormat);
     ComboBox_PaymentStatus.SelectedIndex           = ComboBox_PaymentStatus.Items.IndexOf(templateParticipat.paymentStatus);
     ComboBox_Materials.SelectedIndex               = ComboBox_Materials.Items.IndexOf(templateParticipat.materials ? "Yes":"No");
     ComboBox_ParticipateEveningEvent.SelectedIndex = ComboBox_ParticipateEveningEvent.Items.IndexOf(templateParticipat.participateEveningEvent ? "Yes" : "No");
     ComboBox_ParticipateDay1.SelectedIndex         = ComboBox_ParticipateDay1.Items.IndexOf(templateParticipat.participateInDay1 ? "Yes" : "No");
     ComboBox_ParticipateDay2.SelectedIndex         = ComboBox_ParticipateDay2.Items.IndexOf(templateParticipat.participateInDay2 ? "Yes" : "No");
     ComboBox_ParticipateDay3.SelectedIndex         = ComboBox_ParticipateDay3.Items.IndexOf(templateParticipat.participateInDay3 ? "Yes" : "No");
     ComboBox_ParticipateDay4.SelectedIndex         = ComboBox_ParticipateDay4.Items.IndexOf(templateParticipat.participateInDay4 ? "Yes" : "No");
     return(true);
 }