private void BtnLoadPartBirthMonth_Click(object sender, EventArgs e) { if (ComboFromBirthMonth.SelectedItem == null && ComboToBirthMonth.SelectedItem == null) { LblFromBirthMonth.ForeColor = Color.Red; LblToBirthMonth.ForeColor = Color.Red; } else if (ComboFromBirthMonth.SelectedItem == null && ComboToBirthMonth.SelectedItem != null) { LblFromBirthMonth.ForeColor = Color.Red; LblToBirthMonth.ForeColor = Color.Black; } else if (ComboFromBirthMonth.SelectedItem != null && ComboToBirthMonth.SelectedItem == null) { LblFromBirthMonth.ForeColor = Color.Black; LblToBirthMonth.ForeColor = Color.Red; } else { LblFromBirthMonth.ForeColor = Color.Black; LblToBirthMonth.ForeColor = Color.Black; this.vIW_GetPeopleDataTableAdapter.FillByPartMonth(this.goodShepherdDataSet.VIW_GetPeopleData, Convert.ToInt32(ComboFromBirthMonth.Value), Convert.ToInt32(ComboToBirthMonth.Value), Convert.ToInt32(ComboChruch.Value)); ReportMonth1.SetDataSource(goodShepherdDataSet); ReportMonth1.SetParameterValue("Adress", CMXAreaChurch.Text); ReportMonth1.SetParameterValue("City", CMXCityChurch.Text); ReportMonth1.SetParameterValue("Church", ComboChruch.Text); CR.ReportSource = ReportMonth1; } }
private void BtnLoadPartAge_Click(object sender, EventArgs e) { LblFromBirthMonth.ForeColor = Color.Black; LblToBirthMonth.ForeColor = Color.Black; this.vIW_GetPeopleDataTableAdapter.FillByPartAge(this.goodShepherdDataSet.VIW_GetPeopleData, Convert.ToInt32(NumFromAge.Value), Convert.ToInt32(NumToAge.Value), Convert.ToInt32(ComboChruch.Value)); ReportMonth1.SetDataSource(goodShepherdDataSet); ReportMonth1.SetParameterValue("Adress", CMXAreaChurch.Text); ReportMonth1.SetParameterValue("City", CMXCityChurch.Text); ReportMonth1.SetParameterValue("Church", ComboChruch.Text); CR.ReportSource = ReportMonth1; }