private void cmbCategory_SelectedIndexChanged(object sender, EventArgs e) { if (cmbCategory.Text == "FullTime") { // Show Corresponding Full Time Options cmbFTPosition.Show(); FTAnualSallabel.Show(); txtFTAnnualSalary.Show(); FTPOSlabel.Show(); FTlab01.Show(); // Hide Others PTContractMlabel.Hide(); cmbPTContractType.Hide(); PTContTypelabel.Hide(); PTCTHourlySallabel.Hide(); PTCTWeekHlabel.Hide(); PTInternTrimlabel.Hide(); txtPTContractMonth.Hide(); txtPTCTWeekHours.Hide(); txtPTInternSal.Hide(); txtPTTCHourlySal.Hide(); PTTClab01.Hide(); PTINlab01.Hide(); } else if (cmbCategory.Text == "PartTime") { // Hide Corresponding Full Time Options cmbFTPosition.Hide(); FTAnualSallabel.Hide(); txtFTAnnualSalary.Hide(); FTPOSlabel.Hide(); FTlab01.Show(); // Show Part Time Options cmbPTContractType.Show(); PTContTypelabel.Show(); // Wait for selection of Contract Type combo PTContractMlabel.Hide(); PTCTHourlySallabel.Hide(); PTCTWeekHlabel.Hide(); PTInternTrimlabel.Hide(); txtPTContractMonth.Hide(); txtPTCTWeekHours.Hide(); txtPTInternSal.Hide(); txtPTTCHourlySal.Hide(); PTTClab01.Hide(); PTINlab01.Hide(); } else if (cmbCategory.Text == "Undefined") { // Hide all cmbFTPosition.Hide(); FTAnualSallabel.Hide(); txtFTAnnualSalary.Hide(); FTPOSlabel.Hide(); FTlab01.Hide(); PTContractMlabel.Hide(); cmbPTContractType.Hide(); PTContTypelabel.Hide(); PTCTHourlySallabel.Hide(); PTCTWeekHlabel.Hide(); PTInternTrimlabel.Hide(); txtPTContractMonth.Hide(); txtPTCTWeekHours.Hide(); txtPTInternSal.Hide(); txtPTTCHourlySal.Hide(); PTTClab01.Hide(); PTINlab01.Hide(); } }
private void cmbPTContractType_SelectedIndexChanged(object sender, EventArgs e) { if (cmbPTContractType.Text == "Consultant_Trainers") { // Hide Corresponding Full Time Options cmbFTPosition.Hide(); FTAnualSallabel.Hide(); txtFTAnnualSalary.Hide(); FTPOSlabel.Hide(); FTlab01.Hide(); // Show Part Time Options cmbPTContractType.Show(); PTContTypelabel.Show(); // Show Consultant_Trainers Options PTContractMlabel.Show(); PTCTHourlySallabel.Show(); PTCTWeekHlabel.Show(); txtPTContractMonth.Show(); txtPTContractMonth.Text = ""; txtPTContractMonth.ReadOnly = false; txtPTCTWeekHours.Show(); txtPTTCHourlySal.Show(); PTTClab01.Show(); // Hide Internship Options txtPTInternSal.Hide(); PTInternTrimlabel.Hide(); PTINlab01.Hide(); } else if (cmbPTContractType.Text == "Internship_Student") { // Hide Corresponding Full Time Options cmbFTPosition.Hide(); FTAnualSallabel.Hide(); txtFTAnnualSalary.Hide(); FTPOSlabel.Hide(); FTlab01.Hide(); // Show Part Time Options cmbPTContractType.Show(); PTContTypelabel.Show(); // Hide Consultant_Trainers Options PTCTHourlySallabel.Hide(); PTCTWeekHlabel.Hide(); txtPTCTWeekHours.Hide(); txtPTTCHourlySal.Hide(); PTTClab01.Hide(); // Show a Fixed Contract Internship Month txtPTContractMonth.Show(); txtPTContractMonth.Text = "3"; txtPTContractMonth.ReadOnly = true; PTContractMlabel.Show(); // Show Internship Options txtPTInternSal.Show(); PTInternTrimlabel.Show(); PTINlab01.Show(); } else if (cmbPTContractType.Text == "Undefined") { // Hide Corresponding Full Time Options cmbFTPosition.Hide(); FTAnualSallabel.Hide(); txtFTAnnualSalary.Hide(); FTPOSlabel.Hide(); // Hide Consultant_Trainers Options PTCTHourlySallabel.Hide(); PTCTWeekHlabel.Hide(); txtPTCTWeekHours.Hide(); txtPTTCHourlySal.Hide(); // Hide a Fixed Contract Internship Month txtPTContractMonth.Hide(); PTContractMlabel.Hide(); // Hide Internship Options txtPTInternSal.Hide(); PTInternTrimlabel.Hide(); } }