public void SetActivityGroup() { if (EditMode) { AdministrationDAC dac = new AdministrationDAC(); var dr = dac.RetrieveActivityGroup(ActivityID); var drdet = dac.RetrieveActivity(ActivityID); chkMale.Checked = dr.forMale; chkFemale.Checked = dr.forFemale; chkChild.Checked = dr.forChildren; if (dr.AgeFrom == 0 && dr.AgeTo == 99) { chkAgeAll.Checked = true; } else { txtOldFrom.Text = dr.AgeFrom.ToString(); txtOldTo.Text = dr.AgeTo.ToString(); } tabRowAge.Visible = !chkAgeAll.Checked; if (!string.IsNullOrEmpty(drdet.Keywords)) { txtKeyword.Text = drdet.Keywords; } } }