예제 #1
0
 private void showHidePyamentAmountAndDate()
 {
     if (ComboBox_PaymentStatus.SelectedIndex == 2)
     {
         TextBox_PaymentAmount.Hide();
         Label_PaymentAmount.Hide();
     }
     else
     {
         TextBox_PaymentAmount.Show();
         Label_PaymentAmount.Show();
     }
     if (ComboBox_PaymentStatus.SelectedIndex == 1)
     {
         DateTime_PaymentDate.Show();
         Label_PaymentDate.Show();
     }
     else
     {
         DateTime_PaymentDate.Hide();
         Label_PaymentDate.Hide();
     }
 }
예제 #2
0
        private async void loadWindowData()
        {
            participationFormats = await participationFormatServices.getAllParticipationFormats();

            PictureBox_DeleteAdditionalPhoneNumber.Hide();
            TextBox_AdditionalPhoneNumber.Text = "";
            TextBox_AdditionalPhoneNumber.Hide();
            Label_AdditionalPhoneNumber.Hide();


            foreach (Event eventEntity in events)
            {
                ComboBox_Events.Items.Add(eventEntity.eventName);
            }
            foreach (CompanyTypes companyType in (CompanyTypes[])Enum.GetValues(typeof(CompanyTypes)))
            {
                ComboBox_CompanyType.Items.Add(companyType.ToString());
            }


            foreach (ParticipationFormat participationFormat in participationFormats)
            {
                ComboBox_ParticipationFormat.Items.Add(participationFormat.Value);
            }
            //Set payment status values to comboBox and select first item
            foreach (PaymentStatus paymentStatus in (PaymentStatus[])Enum.GetValues(typeof(PaymentStatus)))
            {
                ComboBox_PaymentStatus.Items.Add(paymentStatus.ToString());
            }
            ComboBox_PaymentStatus.SelectedIndex = 0;

            //Set Yes No values to materials, participation in evening event, and participation
            //in event days comboBoxes and select no values for all exept for participating in
            //first day of event
            foreach (YesNo yesNo in (YesNo[])Enum.GetValues(typeof(YesNo)))
            {
                ComboBox_Materials.Items.Add(yesNo.ToString());
                ComboBox_ParticipateEveningEvent.Items.Add(yesNo.ToString());
                ComboBox_ParticipateDay1.Items.Add(yesNo.ToString());
                ComboBox_ParticipateDay2.Items.Add(yesNo.ToString());
                ComboBox_ParticipateDay3.Items.Add(yesNo.ToString());
                ComboBox_ParticipateDay4.Items.Add(yesNo.ToString());
            }
            ComboBox_Materials.SelectedIndex = 1;
            ComboBox_ParticipateEveningEvent.SelectedIndex = 1;
            ComboBox_ParticipateDay1.SelectedIndex         = 0;
            ComboBox_ParticipateDay2.SelectedIndex         = 1;
            ComboBox_ParticipateDay3.SelectedIndex         = 1;
            ComboBox_ParticipateDay4.SelectedIndex         = 1;

            TextBox_PaymentAmount.Text = "0";

            ComboBox_PaymentStatus.SelectedIndex = 0;
            ComboBox_ParticipationFormat.Items.Add(addNewParticipationFormat);
            ComboBox_ParticipationFormat.Items.Add(deleteParticipationFormat);
            ComboBox_ParticipationFormat.SelectedIndexChanged += ParticipationFormatSelectedIndexChanged;
            DateTime_PaymentDate.Hide();
            if (addParticipantDataAction)
            {
                bool added = addParticipantData();
                BringToFront();
            }
        }